suchuwato Posted October 12, 2004 Posted October 12, 2004 (edited) This is a test page for mysql. i think the highlighted bit is the problem, but how do i find my user? <html> <head> <title> MySQL Test </title> </head> <body> <!-- mysql_up.php --!> <?php [color=purple][b]$host="mybesthost.com"; $user="lego"; $password="lego";[/b][/color] mysql_connect($host,$user,$password); $sql="show status"; $result = mysql_query($sql); if ($result == 0) echo("<b>Error " . mysql_errno() . ":" . mysql_error() . "</b>"); elseif (mysql_num_rows($result) == 0) echo("<b>Query executed successfully!<b>"); else { ?> <!-- table that displays the results --!> <table border="1"> <tr><td><b>Variable_name</b></td><td><b>Value</b></td></tr> <?php for ($i = 0; $i < mysql_num_rows($result); $i++) { echo("<tr>"); $row_array = mysql_num_rows($result); for ($j = 0; $j ( mysql_num_fields($result); $j++) { echo("<td>" . $row_array[$j] . "</td>"); } echo("</tr>"); } ?> </table> <>php } ?> </body> </html> Edited October 12, 2004 by lego Share this post Link to post Share on other sites More sharing options...
d3bruts1d Posted October 12, 2004 Posted October 12, 2004 This is a test page for mysql. i think the highlighted bit is the problem, but how do i find my user? Your user? You mean your SQL user? Should be assigned to you by your host (usually). If you use PHPMyAdmin... it would be the user you loginto with that. Share this post Link to post Share on other sites More sharing options...
suchuwato Posted October 12, 2004 Posted October 12, 2004 Your user? You mean your SQL user? Should be assigned to you by your host (usually). If you use PHPMyAdmin... it would be the user you loginto with that. oh, thanks d3 Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now