I have created a file called addvenue.php with the following if condition at the start of it:
Code: Select all
<?php
if (isset($_GET['addvenue'])): // If the user wants to add a venue
?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<p>Venue Name<br />
<input type="text" name="vname" SIZE="40"><br /><BR>
<input type="submit" name="submitvenue" value="SUBMIT" />
</p>
</form>
<?php
else: // Default page displayI can make the link work with a word:
Code: Select all
echo('<BR><a href="' . $_SERVER['PHP_SELF'] .
'?addvenue=1">Add a venue!</a><BR>');Code: Select all
echo('<FORM METHOD="LINK" ACTION="addvenue.php">
<INPUT TYPE="submit" VALUE="Refresh Page"></FORM>');Code: Select all
echo('<BR>
<FORM METHOD="LINK" ACTION="' . $_SERVER['PHP_SELF'] .'?addvenue=1"><INPUT TYPE="submit" VALUE="Add Venue">');anyone know why this is happening or how else i could do it? Am i going about this the wrong way?
thanks