Hello all,
Im studying php but ran into the following prob that i cannot seem to solve
this is my first part of the form and i ran it through the browser to see if all was ok
<?
if (@$saywhich) {
include ("statecapitals.php");
$choice=rand(0,49);
if ($which=='state') {
$state = $states[$choice];
print ("What is the capital of $state?<br>");
print ("<form action='miniquizcheck.php' ");
print ("method='get'>\n");
print ("<input type='text' name='capital'><br>n");
print ("<input type='hidden' name='which'>");
print ("value='$which'>n");
print ("<input type='text' name='choice' ");
print ("<input type='hidden' name='choice'>n");
print ("value='$choice'>n");
print ("<input type='submit' value='Submit answer'>");
print ("</form>n");
?>
I get a parse error on line 13 which is
print ("What is the capital of $state?<br>");
I get no further explanation like missing of quotes or something like that.
Ive tried typing all the code in notepad and also typed it in dreamweaver to do a code check but i cannot find the error.
Can somebody please help me out on this one? probably very simple one or maybe something is misconfigured on my local server?