Yea i know but that is a temperal solution to one problem... the (@)
i still cant get my saved id to show...
Code: Select all
echo "<table border='1'>";
while(@$row = mysql_fetch_array( @$result )) //hämtar info från tabell.
{
echo "<tr><td>";
echo @$row[fornamn]."'Where @$id=[saved_id]' </td><td>".@$row[efternamn]."'Where @$id=[saved_id]. </td>"; //skriver ut innehållet radvis (inom kaninöron = html kod)
echo "</tr>";
}
echo "</table>";
Here im telling it to write the "firstname" and the "lastname" when i add this to my "code" nothing at all comes up
i know it should say "thomas Persson" within a table but as i got it right now nothing shows.
i got a database called ... with a table called konto and within that i got "the saved id" so with that i should get a number and with that number i get what row "the user" is on...
that was my receive page...
this is my sending page...
Code: Select all
<?php
include "database.php";//Fil för databasinställning.
if (@$_POST["submit"])//Kollar om knappen SUBMIT använts.
{
$sql="SELECT * FROM konto";//Ta allt från databas tabellen: "konto".
$result = mysql_query($sql) or die(mysql_error(FAIL));//Välj all info i tabell.
while($row = mysql_fetch_array( $result ))//Hämtar info från tabell.
{
if ((@$_POST[user]== @$row[user]) && (@$_POST[password]== @$row[pass]) && (@$row[***] =="1"))//Kollar så att användare finns i databasen och kollar om användaren är ***.
{
header('Refresh: 0; url=../***/***_***(***).php?saved_id='.$row[saved_id]);//Skickas till angiven sida.
}
if ((@$_POST[user]== @$row[user]) && (@$_POST[password]== @$row[pass]) && (@$row[***] =="0"))//Kollar så att användare finns i databasen och kollar om användaren är admin.
{
header('Refresh: 0; url=../menu_main(menu).php?saved_id='.$row[saved_id]);//Skickas till angiven sida.
}
}
exit;//Lämnar loop.
header("Location: login.php");//Skickas till angiven sida efter en viss tid.
}
?>
the *** stands for secret ^^
Here u can see that im sending the saved_id
Code: Select all
header('Refresh: 0; url=../menu_main(menu).php?saved_id='.$row[saved_id]) // here u can see im sending the saved_id