Note that there are some explanatory texts on larger screens.

plurals
  1. POCall to a member function escape() on a non-object in \myform.php on line 8
    text
    copied!<p>i am making a simple data entry form for wordpress. i have the form submitting to the following bit of php:<br> <pre><code>//protect your codes from attacks. isset($_POST['exporter']) ? $exporter=$wpdb-&gt;escape($_POST['exporter']) : $exporter=''; isset($_POST['importer']) ? $importer=$wpdb-&gt;escape($_POST['importer']) : $importer=''; isset($_POST['conveyance']) ? $conveyance=$wpdb-&gt;escape($_POST['conveyance']) : $conveyance=''; isset($_POST['origin']) ? $origin=$wpdb-&gt;escape($_POST['origin']) : $origin=''; isset($_POST['dpoe']) ? $dpoe=$wpdb-&gt;escape($_POST['dpoe']) : $dpoe=''; isset($_POST['impcon']) ? $impcon=$wpdb-&gt;escape($_POST['impcon']) : $impcon=''; isset($_POST['container']) ? $container=$wpdb-&gt;escape($_POST['container']) : $container=''; isset($_POST['nopk']) ? $nopk=$wpdb-&gt;escape($_POST['nopk']) : $nopk=''; isset($_POST['tyop']) ? $tyop=$wpdb-&gt;escape($_POST['tyop']) : $tyop=''; isset($_POST['name']) ? $name=$wpdb-&gt;escape($_POST['name']) : $name=''; isset($_POST['botname']) ? $botname=$wpdb-&gt;escape($_POST['botname']) : $botname=''; isset($_POST['quantity']) ? $quantity=$wpdb-&gt;escape($_POST['quantity']) : $quantity=''; isset($_POST['certify']) ? $certify=$wpdb-&gt;escape($_POST['certify']) : $certify=''; isset($_POST['declaration']) ? $declaration=$wpdb-&gt;escape($_POST['declaration']) : $declaration=''; isset($_POST['date']) ? $date=$wpdb-&gt;escape($_POST['date']) : $date=''; isset($_POST['treatment']) ? $treatment=$wpdb-&gt;escape($_POST['treatment']) : $treatment=''; isset($_POST['dutemp']) ? $dutemp=$wpdb-&gt;escape($_POST['dutemp']) : $dutemp=''; isset($_POST['concen']) ? $concen=$wpdb-&gt;escape($_POST['concen']) : $concen=''; isset($_POST['adinfo']) ? $adinfo=$wpdb-&gt;escape($_POST['adinfo']) : $adinfo=''; isset($_POST['insname']) ? $insname=$wpdb-&gt;escape($_POST['insname']) : $insname=''; isset($_POST['place']) ? $place=$wpdb-&gt;escape($_POST['place']) : $place=''; isset($_POST['namedesg']) ? $namedesg=$wpdb-&gt;escape($_POST['namedesg']) : $namedesg=''; isset($_POST['dateissue']) ? $dateissue=$wpdb-&gt;escape($_POST['dateissue']) : $dateissue=''; if (is_object($wpdb) &amp;&amp; is_a($wpdb, 'wpdb')) { if (!$wpdb-&gt;insert('form', array( 'consignor'=&gt;$_POST[exporter] ,'consignee'=&gt;$_POST[importer] ,'conveyance'=&gt;$_POST[conveyance] .... ?&gt; </code></pre> <p>any ideas on why i am getting the error?</p>
 

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