Jump to content

[SOLVED] parse error???


rxn155

Recommended Posts

i got this error:

Parse error: parse error, unexpected '>' in /homepages/6/d209800063/htdocs/mysql_up.php on line 6

 

this is my code... havent had much luck with echo tags:

 

<?php

/* Program: mysql_up.php

* Desc: Connects to MySQL Server and

* outputs settings.

*/

echo “<html>

<head><title>Test MySQL</title></head>

<body>”;

$host=”host”;

$user=”mysqlaccount”;

$password=”mysqlpassword”;

$cxn = mysqli_connect($host,$user,$password);

$sql=”SHOW STATUS”;

$result = mysqli_query($cxn,$sql);

if($result == false)

{

echo “<h4>Error: “.mysqli_error($cxn).”</h4>”;

}

else

{

/* Table that displays the results */

echo “<table border=’1’>

<tr><th>Variable_name</th>

<th>Value</th></tr>”;

for($i = 0; $i < mysqli_num_rows($result); $i++)

{

echo “<tr>”;

$row_array = mysqli_fetch_row($result);

for($j = 0;$j < mysqli_num_fields($result);$j++)

{

echo “<td>”.$row_array[$j].”</td>\n”;

}

}

echo “</table>”;

}

?>

</body></html>

 

Link to comment
Share on other sites

I wouldn't recommend him using notepad, try to get PHP editor, those software that specially made for writing php codes, they will highlight your code. In other words, you can spot any errors just by looking at the codes' colour.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.