Jump to content

write mysql record


jesushax

Recommended Posts

found it its $row yes sooooo

 

my connection.php file

 

<?php

$uname = 'username'; 
$pass = 'password'; 
$db_name = 'database name'; 
$host = 'host';

$con = mysql_connect($host, $uname, $pass);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

$db_selected = mysql_select_db($db_name, $con);
if (!$db_selected) 
{
die ('Can\'t use database : ' . mysql_error());
}
?>

then in my page

 

<?php include("/includes/connection.php"); ?>
<?php

mysql_query("SELECT * FROM tblUsers");while($row = mysql_fetch_array($result))
  {
  echo $row['FirstName'] . " " . $row['LastName'];
  echo "<br />";
  }mysql_close($con);
?> 

 

this is how its done yes?

Link to comment
https://forums.phpfreaks.com/topic/92082-write-mysql-record/#findComment-471551
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.