Forums

PHP

This topic is locked

HELP! Can't delete row....

Posted 02 Dec 2006 01:37:09
1
has voted
02 Dec 2006 01:37:09 Michael O'Neil posted:
This is what I have so far:
<pre id=code><font face=courier size=2 id=code>
&lt;select name="project_number" class="txtbox"&gt;
&lt;option value="1" selected&gt;&lt;/option&gt;
&lt;?php
$result = mysql_query("SELECT * FROM projnum";
while($row = mysql_fetch_array($result))
{
echo '&lt;option value="' . $row['project_number'] . '"&gt; ' . $row['project_number'] . "&lt;/option&gt;\n ";
}
mysql_query("DELETE FROM projnum WHERE project_number='$project_number'" or die(mysql_error());
?&gt;
&lt;/select&gt;
</font id=code></pre id=code>

The row won't delete, no errors reported...

HELP!

Replies

Replied 02 Dec 2006 03:14:15
02 Dec 2006 03:14:15 LorD ExoskeletoN replied:
is there any submit button in this code?

<center>
afraid NOT to FAIL for you learn NOTHING

www.nasbikesphilippines.bravehost.com
<img src="www.motorcyclephilippines.com/forums/signaturepics/sigpic14460_2.gif" border=0></center>


Edited by - exoskeleton on 02 Dec 2006 03:23:02
Replied 05 Dec 2006 00:31:24
05 Dec 2006 00:31:24 Michael O'Neil replied:
Yes, the above code is one field in the form. The form is to setup new projects. In this field people choose a project number from a list. And I need it to work so that when a project number is chosen, it is then removed from the list so that the same project number is not chosen twice. When the form is completed, it is submiting the info to a project database. The project list is being pulled from a different table, than that of the project database.

Reply to this topic