Ive done the design for my view.php file, and its all working well, but, its got a few teething errors, my echo statements wont work.
what i'm trying to get at is, getting a layout for each different user, so when they click on their name in the testview.php table, it links to view.php and on the view.php file they see:
- [az_firstname][az_surname] at the top in Bold as a header,
- [user_id] a few spaces below in normal font and
- [password] 2 spaces below user_id in normal font
here is my code for testview.php which works and links nicely to the view.php
<?php
$conn = mysql_connect("localhost","root","") or die("Could Not Connect To The Database");
mysql_select_db("aziz",$conn) or die("Could Not Select The Database");
$result=mysql_query("SELECT user_id,az_firstname,az_surname,username FROM azizpassword ORDER BY user_id;");
$i=0;
while( $row=mysql_fetch_array($result) )
{
if($i>0)
{
echo "<tr valign=top>";
echo "<td bgcolor=#ffffff background='img/strichel.gif' colspan=6><img src=img/blank.gif wuser_idth=1 height=1></td>";
echo "</tr>";
}
echo "<tr valign=center>";
echo "<td width=100 class=table><b>".$row['user_id']."</b></td>";
echo "<td width=100 class=table><a href=\"view.php?id=".$row['user_id']."\">".$row['az_surname']."</a></td>";
echo "<td width=100 class=table>".$row['az_firstname']." </td>";
echo "<td width=100 class=table><i>".$row['username']."</i> </td>";
echo "<td class=table></td>";
echo "</tr>";
$i++;
}
echo "<tr valign=bottom>";
echo "<td bgcolor=#fb7922 colspan=6><img src=img/blank.gif wuser_idth=1 height=8></td>";
echo "</tr>";
?>
here is my code for view.php:
<?php
if(isset($_REQUEST['user_id']))
{
$user_id = $_REQUEST['user_id'];
$conn = mysql_connect("localhost","root","") or die("Could Not Connect To The Database");
mysql_select_db("aziz",$conn) or die("Could Not Select The Database");
//sql query somethinglike
$sql = "SELECT * FROM users_table WHERE user_id = '$id'";
//the display stuff here. }
}
?>
I've taken all the display stuff out for now, because ive tried everything and i get nothing but errors.
So what I need to know is what is the best way to achieve what is wanted above which is the layout of
-[az_firstname][az_surname] at the top in Bold as a header,
- [user_id] a few spaces below in normal font and
- [password] 2 spaces below user_id in normal font
If anyone could show me some examples on how to get this information to appear, it'd be much appreciated!!
Any help would be much appreciated because been stuck on this for a very long time now so it would be greatly appreciated if someone could help me with this problem THANK YOU ALL FOR YOUR TIME 🙂