getting url from db
Posted: Mon May 03, 2010 7:34 pm
hey all.
I have a table in a db and i have id,name,url and url is the website location of the name.
here is my drop box code
I have it saving the name to another table however I want to also save teh url to that same table
here is my insert code
IT dont save anything in the box_url field in members and I cant figure out why
Please help
I have a table in a db and i have id,name,url and url is the website location of the name.
here is my drop box code
Code: Select all
<select name="box" class="textbox" id="box">
<?php $r=mysql_query("select * from table WHERE status='On'")or die(mysql_error());
while($row = mysql_fetch_array($r,MYSQL_ASSOC)) {
echo '<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
?>here is my insert code
Code: Select all
$q = mysql_query("INSERT INTO members(id,box,box_url)VALUES(null,'$box','$box_url')")or die( mysql_error() );
Please help