Note that there are some explanatory texts on larger screens.

plurals
  1. POmove_uploaded_file is giving a error
    primarykey
    data
    text
    <p><strong>this is my form</strong> </p> <pre><code>&lt;form action="test.php" method="post" name="myform"&gt; &lt;table width="500" border="0"&gt; &lt;tr&gt; &lt;td width="369" colspan="3"&gt;Admin's Area &lt;/td&gt; &lt;td width="121"&gt;&lt;?php echo $_SESSION['name'];?&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="3"&gt;sponseres list &lt;/td&gt; &lt;td&gt;&lt;a href="admin.php#sponserForm"&gt;+Add new Sponser&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td colspan="3"&gt;&lt;?php echo $sponsere_list; ?&gt;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center" colspan="4"&gt; &lt;a name="sponserForm" id="sponserForm"&gt;&lt;/a&gt; Add New Sponser Form&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="left"&gt;Sponser name&lt;/td&gt; &lt;td align="left"&gt;&lt;input type="text" name="spname" id="spname" tabindex="1" /&gt;&lt;/td&gt; &lt;td colspan="2" align="center"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="left"&gt;Image&lt;/td&gt; &lt;td align="left"&gt;&lt;input type="file" name="fileToUpload" /&gt;&lt;/td&gt; &lt;td colspan="2" align="center"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="left"&gt;Add this&lt;/td&gt; &lt;td align="left"&gt;&lt;input type="submit" name="sumit" id="sumit" value="Submit" tabindex="3" /&gt;&lt;/td&gt; &lt;td colspan="2" align="center"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td align="center" colspan="4"&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/form&gt; </code></pre> <p><strong>and this is the php code to retrive it</strong></p> <pre><code>&lt;?php if(isset($_POST['spname'])){ $spname=mysql_real_escape_string($_POST['spname']); $user_query = "INSERT INTO `sponsers` (`spname`) VALUES ('{$spname}') "; $sql=mysql_query($user_query)or die (mysql_error()); $spic= mysql_insert_id(); $newname="$spic.jpg"; move_uploaded_file($_FILES["fileToUpload"]["tmp_name"],"../sponsers/$newname")or die (mysql_error()); } ?&gt; </code></pre> <p><strong>when i try to upload a image it gives me this warning message Notice: Undefined index: fileToUpload in J:\xampp\htdocs\srimag\admin\test.php on line 3</strong></p> <p><strong>so i tried to echo the fileToUpload value by using $_POST['fileToUpload'] it show the values without errors so can't figure out the error.</strong> </p> <p><strong>so please help me on this :-(</strong> Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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