Forum Moderators: coopster
here is the code for the form.
form.php
[b]
//...[/b] [b]
<form name="pageski" action="menuadd.php">
Please select the page title to add to the menu below.<br />
<select name="pages">
[/b] [b]
<?
while ($row = mysql_fetch_array($query,MYSQL_ASSOC))
{
echo "<option>".$row['name']."</option>";
}
}
mysql_close($dbc);
?>
</select>
<br><br>
Now enter the text you want to appear in the menu<br />
<input type="text" name="pname"><br><br />
<input type="submit" name="Submit" value="Add to Menu">
</form>
[/b] Thats the form, it selects the items in the list from a database and displays them ordered by ASC.
Now when i press submit the menuadd.php file looks like this, ignore the commented out code.
menuadd.php
[b]
<?php
include '/home/www/juttuffi/dbc.php';
$name = $_POST['pages'];
$menuname = $_POST['pname'];
[/b][b]
echo $name;
echo $menuname;
[/b] [b]
//commented out code here
?>
[/b] Now as you can see all i am trying to do here is echo the values from the forms on the previous page, but for some reason it isnt working, can anyone tell me why?