rxn155 Posted July 13, 2007 Share Posted July 13, 2007 sorry guys, im back again... Call to undefined function: mysqli_connect() in /homepages/6/d209800063/htdocs/mysql_up.php on line 12 <?php /* Program: mysql_up.php * Desc: Connects to MySQL Server and * outputs settings. */ echo "<html> <head><title>Test MySQL</title></head> <body>"; $host="XXXXXXX"; $user="XXXXXXX; $password="XXXXX"; $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> the "XXXX" is where i put my appropriate information... Link to comment https://forums.phpfreaks.com/topic/59767-call-to-unidentified-function/ Share on other sites More sharing options...
cooldude832 Posted July 13, 2007 Share Posted July 13, 2007 tell me what <?php php_info(); ?> says if u don't have php >5 then mysqli functions are not included thsu an unknown function Link to comment https://forums.phpfreaks.com/topic/59767-call-to-unidentified-function/#findComment-297101 Share on other sites More sharing options...
rxn155 Posted July 13, 2007 Author Share Posted July 13, 2007 ok... thats stinks because the server is 4.0.... anyway, how would i go about doing that in 4.0? Link to comment https://forums.phpfreaks.com/topic/59767-call-to-unidentified-function/#findComment-297102 Share on other sites More sharing options...
mihail Posted July 13, 2007 Share Posted July 13, 2007 replace mysqli with mysql Link to comment https://forums.phpfreaks.com/topic/59767-call-to-unidentified-function/#findComment-297109 Share on other sites More sharing options...
trq Posted July 13, 2007 Share Posted July 13, 2007 Just use mysql* instead of mysqli*. Link to comment https://forums.phpfreaks.com/topic/59767-call-to-unidentified-function/#findComment-297110 Share on other sites More sharing options...
cooldude832 Posted July 13, 2007 Share Posted July 13, 2007 Yes the mysqli library is considered the second release to the mysql libraries of php. It stands for Improved Edition, however the improvements it make are only good if you are already good at php and have a good understand of what you are trying to do. the earlier version of it mysql lib will do sufficient work for you and can do all the work (90%) that mysqli can do just might be more coding. Link to comment https://forums.phpfreaks.com/topic/59767-call-to-unidentified-function/#findComment-297113 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.