View Single Post
  #1 (permalink)  
Old 05-15-2008, 08:00 PM
zeroradius's Avatar   
zeroradius zeroradius is offline
Programming Professional
 
Join Date: Feb 2008
Location: Ohio
Posts: 290
Credits: 87
Rep Power: 4
zeroradius will become famous soon enough
Send a message via AIM to zeroradius Send a message via Yahoo to zeroradius
Default Not outputting selected values?

Hi, I am curently working on a private messaging system in php. I started working on the final page (the view mail) and have ran into a snag. When you select the message it sends you to a page name view_sent.php?id="id here" it takes me to the new page and the corect Id shows in the address bar and no errors come out but the page does not return any information. right now i just have it returning the value of sender so i can get it working before i code the layout and return all of the information. Here is my code for the view_sent

PHP Code:

<?php
$id
=$_Get['id'];
$user="blah"// need to change to session later
$host="--------------"
$username="---------"
$password="---------";
$db_name="---------";  
$tbl_name="---------"


mysql_connect("$host""$username""$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB");

$sql="SELECT * FROM $tbl_name Where id='$id'";
$result=mysql_query($sql);
$row mysql_fetch_row($result);
echo 
$row['sender'];
?>
__________________
"I would love to change the world ...... but they won't give me the sorce code"
Reply With Quote

Sponsored Links