I can pass a value to a function:
Code: Select all
<FORM METHOD="post" ACTION="' . $_SERVER['PHP_SELF'] . '?editvenue=1; vid=' .$vid. '"><INPUT TYPE="submit" VALUE="Update"></FORM>but how would i get the value to display in the fields of an HTML form by default?
i have tried:
Code: Select all
<?php
elseif (isset($_GET['editvenue'])): // If the user wants to edit a venue
echo('
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
UPDATE VENUE<BR>
<p>Vid<br /> <BR>
<input type="text" name="vid" SIZE="4" VALUE="' . $vid . '"><br /><BR>
<TABLE><TR><TD><FORM><input type="submit" name="updatevenue" value="Submit" /></FORM></TD><TD><FORM METHOD="LINK" ACTION="updatevenue.php"><INPUT TYPE="submit" VALUE="Cancel"></FORM></TD></TR></TABLE>
</p>');
?>is it something to do with this bit?:
Code: Select all
<?=$_SERVER['PHP_SELF']?>any help would be great
thanks!