Note that there are some explanatory texts on larger screens.

plurals
  1. POunable to store a data value into database
    primarykey
    data
    text
    <p>I am unable to store the data in the MySQL database. url1 data -> is not forwarding to the u1.php.</p> <p>I am unable to get through this. While running this query on u1.php with a dummy valve it's perfect:</p> <pre><code>mysql_query("UPDATE admins SET url1 = '1234568' WHERE id = '1'"); </code></pre> <p>When I check the DB it is perfect with the above value, but when I try form data url1 is not working.</p> <pre><code>&lt;form action="u1.php" method="post" enctype="multipart/form-data"&gt; &lt;label for="file"&gt;Select The File:&lt;/label&gt; &lt;input type="file" name="file" id="file"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Enter Ad Url :&lt;input type="text" name="url1" id="url1" placeholder="Please Enter Ad Url" width: 500px;&gt; &lt;br&gt;&lt;br&gt; &lt;input type="submit" name="submit" value="Submit"&gt; &lt;/form&gt; </code></pre> <p><strong>u1.php file</strong></p> <pre><code>&lt;?php mysql_connect("localhost","root",""); mysql_select_db("apphp"); mysql_query("UPDATE admins SET url1 = '$url1' WHERE id = '1'"); $allowedExts = array("gif", "jpeg", "jpg", "png"); $temp = explode(".", $_FILES["file"]["name"]); $extension = end($temp); if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/jpg") || ($_FILES["file"]["type"] == "image/pjpeg") || ($_FILES["file"]["type"] == "image/x-png") || ($_FILES["file"]["type"] == "image/png")) &amp;&amp; ($_FILES["file"]["size"] &lt; 350000) &amp;&amp; in_array($extension, $allowedExts)) { if ($_FILES["file"]["error"] &gt; 0) { echo "Error: " . $_FILES["file"]["error"] . "&lt;br&gt;"; } else { echo "Upload: " . $_FILES["file"]["name"] . "&lt;br&gt;"; echo "Type: " . $_FILES["file"]["type"] . "&lt;br&gt;"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB&lt;br&gt;"; move_uploaded_file($_FILES["file"]["tmp_name"], "images/h1.jpg"); echo "Stored in: " . "images/" . $_FILES["file"]["name"]; } } else { echo "Invalid file"; } ?&gt; </code></pre>
    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.
 

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