[Solved] how to acces super variable $_POST in PDO

PDO is not a different language. It is a PHP extension used to connect and operate on a datasource. You can use filter_input(INPUT_POST, ‘username’) without a problem in the code you have there. $stmt = $db->prepare(‘INSERT INTO members (username,password,email,active) VALUES (:username, :password, :email, :active)’); $stmt->execute(array( ‘:username’ => filter_input(INPUT_POST, ‘username’), ‘:password’ => $hashedpassword, ‘:email’ => filter_input(INPUT_POST, … Read more

[Solved] socket program to add integers in c

Simple: int my_int = 1234; send(socket, &my_int, sizeof(my_int), 0); The above code sends the integer as is over the socket. To receive it on the other side: int my_int; recv(socket, &my_int, sizeof(my_int), 0); However, be careful if the two programs runs on systems with different byte order. Edit: If you worry about platform compatibilities, byte … Read more

[Solved] SAPUI5 Refresh the service

Consider the model and refresh the omodel… Ex: var oModel = sap.ui.model.odata.ODataModel(“your url”); sap.ui.getCore().setModel(oModel); while refreshing the model…. sap.ui.getCore().getModel().refresh(true); 1 solved SAPUI5 Refresh the service

[Solved] how to upload image in cakephp2.5+ and store it in webroot folder [closed]

Use following echo $this->Form->create(‘Tour’,array(‘autocomplete’ => ‘off’,’enctype’=>’multipart/form-data’)); Allows image/video data to be processed. Inside controller if ($this->request->is(‘post’)) { if(is_uploaded_file($this->request->data[‘Tour’][‘varbigimg’][‘tmp_name’])) { $fileNameFull = $this->request->data[‘Tour’][‘varbigimg’][‘name’]; $oldFile=”../../app/webroot/img/”.$fileNameFull; move_uploaded_file( $this->request->data[‘Tour’][‘varbigimg’][‘tmp_name’], $oldFile ); $this->Tour->create(); $this->request->data[‘Tour’][‘varbigimg’] = $fileNameFull; //HERE you need to specify same for thum $this->request->data[‘Tour’][‘varthumimg’] = $fileNameFull; ////HERE you need to specify same for thumbfield if ($this->Tour->save($this->request->data)) { $this->Session->setFlash(__(‘Your possstt … Read more

[Solved] Cannot show @string

leaveopinion is not in res/values/strings.xml. So first you need to add it to your strings.xml. Something like this: string name=”leaveopinion”>your_text</string> And to display the real text instead of @string/XXX you need to refresh your_activity.xml . When you did everything above it should be something like this: <?xml version=”1.0″ encoding=”utf-8″?> <resources> <string name=”change”>Change</string> <string name=”Pleasechoosesubject”>Please choose … Read more