Problem with this php code:

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Problem with this php code:

Post by nigma »

<html>

<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>

<?

$csname = $_GET["memName"];

require("util.php");
$sql = new MySQL_Class;
$sql->Create("mc0");

$sql->Query("Select * from users where (csName = '$csname');
$fname = $sql->data[0];
$lname = $sql->data[1];
$csname = $sql->data[2];
$gun = $sql->data[3];
$rank = $sql->data[4];
$os = $sql->data[5];

echo("<table cellspacing=2 cellpadding=2 border=1 bordercolor=black>");
echo '<tr><td>First Name: $fname</td></tr>';
echo '<tr><td>Last Name: $lname</td></tr>';
echo '<tr><td>CS Name: $csname</td></tr>';
echo '<tr><td>Favorite Gun: $gun</td></tr>';
echo '<tr><td>current Rank: $rank</td></tr>';
echo '<tr><td>Current OS: $os</td></tr>';
echo '</table>';

?>

</body>

</html>
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

What errors if any is it giving you?
Btw you posted this in the wrong section =)
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

Post by nigma »

Sorry bout posting this wrong spot. This post is like a few days old and I have found out what was wrong. Nothing was wrong with the syntax inside the html file, it was the syntax inside the stylesheet that was making things not work. Just had to find out a little bit more about CSS to catch my mistake.

Thanks for the help.
User avatar
Kriek
Forum Contributor
Posts: 238
Joined: Wed May 29, 2002 3:46 am
Location: Florida
Contact:

Post by Kriek »

No problem -- good luck with the rest of your project.
Post Reply