Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok one only learns by example, stop using the mysql_functions(), They are no longer maintained and are officially deprecated. And in PHP 5.6 they will most likely be removed, rendering you code broken.</p> <p>Move over to PDO with prepared querys. A Port of your current code using PDO:</p> <pre><code>&lt;?php // SQL Config $config['sql_host']='surveyipad.db.6420177.hostedresource.com'; $config['sql_db'] ='surveyipad'; $config['sql_user']='tom'; $config['sql_pass']='ben'; // SQL Connect try { $db = new PDO("mysql:host=".$config['sql_host'].";dbname=".$config['sql_db'], $config['sql_user'], $config['sql_pass']); $db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db-&gt;setAttribute(PDO::ATTR_EMULATE_PREPARES, false); }catch (Exception $e){ die('Cannot connect to mySQL server.'); } // Check for POST, add isset($_POST['device_Id']) ect to add validations if($_SERVER['REQUEST_METHOD']=='POST'){ // Build your query with placeholders $sql = "INSERT INTO survey_responsese_pfizer (device_Id,R1,R2,R3,comment,update_date_time) VALUES (:device_Id, :R1, :R2, :R3, :comment, :update_date)"; // Prepare it $statement = $db-&gt;prepare($sql); // Assign your vairables to the placeholders $statement-&gt;bindParam(':device_Id', $_POST['device_Id']); $statement-&gt;bindParam(':R1', $_POST['R1']); $statement-&gt;bindParam(':R2', $_POST['R2']); $statement-&gt;bindParam(':R3', $_POST['R3']); $statement-&gt;bindParam(':comment', $_POST['comment']); $statement-&gt;bindParam(':update_date', $_POST['update_date_time']); // Execute the query $statement-&gt;execute(); echo htmlspecialchars($device_Id); } ?&gt; </code></pre> <p>Untested tho, hope it helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload