dean012 Posted November 30, 2013 Share Posted November 30, 2013 Parse error: syntax error, unexpected '<' in F:\xampp\htdocs\taranaki2.php on line 82 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Yakity Yak</title> <link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Abel|Satisfy' rel='stylesheet' type='text/css'> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper"> <p><!-- end #header --></p> <div id="header" class="container"> <div id="logo"> <h1><a href="#">Yakity Yak</a></h1> </div> <div id="menu"> <ul> <li class="current_page_item"><a href="file:///D:/blackpolish/homepage.php">Homepage</a></li> <li><a href="file:///D:/blackpolish/trip.php">Destinations</a></li> <li><a href="#">contact </a></li> <li><a href="#">Login</a></li> <li><a href="adminlogin.php">Leader</a></li> <li></li> <li></li> </ul> </div> </div> <blockquote> <blockquote> <p> <center><img src="../../Documents/Unnamed Site 2/IMG_1913.jpg" width="999" height="388" alt=""/></center> </p> </blockquote> </blockquote> <div id="page"> <div class="post"> <h2 class="title"><a href="#">Taranaki</a></h2> <div class="entry"> <table border='1'> </div> </body> </html> <?php /* This code establishes a connection with the database on the server. The mysql_connect accepts three parameters. The mysql_select_db attempts to select the database that data will be retrived from. It accepts two parameters, one is the name of the database and the other is the connection variable.*/ $con=mysqli_connect("localhost","root","","assesment"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } if(isset($_POST['update'])){ $UpdateQuery= "UPDATE assesment SET ID='$_POST[ID]',Destination='$_POST[Destination]',Difficulty='$_POST[Difficulty]' Where ID=[hidden]"; mysql_query($UpdateQuery, $con); }; $result = mysqli_query($con,"SELECT * FROM taranaki"); echo "<table border='1'> <tr> <th>ID</th> <th>Destination</th> <th>Difficulty</th> </tr>"; while($row = mysqli_fetch_array($result)) echo "<form action=trip2.php method=post>";{ echo "<tr>"; echo "<td>" . <input type="text" name="ID" value=""/>. $row['ID'] . "</td>"; echo "<td>" . <input type="text" name="Destination" value=""/>. $row['Destination'] . "</td>"; echo "<td>" . <input type="text" name="Difficulty" value=""/>. $row['Difficulty'] . "</td>"; echo "<td>" . <input type="hidden" name="hidden" value=""/>. $row['ID'] . " </td>"; echo "<td>". <input type="text" name="update" value="update"/>. "</td>"; echo "</tr>"; echo "</form>";} echo "</table>"; mysqli_close($con); ?> Link to comment https://forums.phpfreaks.com/topic/284391-parse-error-syntax-error-unexpected/ Share on other sites More sharing options...
dean012 Posted November 30, 2013 Author Share Posted November 30, 2013 solved! Link to comment https://forums.phpfreaks.com/topic/284391-parse-error-syntax-error-unexpected/#findComment-1460706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.