Someone in another thread said that some of the coding has changed since Kevin's book, which I currently learned off of.
Other statements were changed, by any chance, has this too?
And the error I recieve is: Parse error: parse error, unexpected T_ENDIF in c:\inetpub\wwwroot\newplayer.php on line 77PHP Code:<?php
if ($_POST['Submit']=="Submit") {
$dbcnx = @mysql_connect("asdf", "asdf", "asdf");
if (!$dbcnx) {
echo ("<P>Unable to connect to the database server at this time.</P>");
exit();
}
if (! @mysql_select_db("planetdraft") ) {
echo("<P>Unable to locate the Roster Database at this time.</P>");
exit();
}
$sql = "Insert into f3_roster_profiles set
name='{$_POST['PlayerName']}',
email='{$_POST['PlayerEmail']}";
if(@mysql_query($sql)) {
echo("You have added player, $name, to the Roster database.");
}else{
echo("Error");
}
exit();
}
?>
<p><a href="<?=$_SERVER['PHP_SELF']?>">Add another Member</a></p>
<p><a href="manage.php">Return to Site management home</a></p>
<?
else:
?>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<p>Enter the new member:<br />
Name: <input type="text" name="name" size="20" maxlength="255" /><br />
Email: <input type="text" name="email" size="20" maxlength="255" /><br />
</form>
<?php endif; ?>



Bookmarks