Dar nu stiu cum sa fac link pentru fiecare profil .
Adica am in mysql 3 inregistrari in prezent si vreau sa am link pentru fiecare
Inregistrarea 1 - link 1 -> site.ro/profil-numeutilizator1
Inregistrarea 2 - link 2 -> site.ro/profil-numeutilizator2
inregistrarea 3 - link 3 -> site.ro/profil-numeutilizator3
inregistrarea x -link x -> site.ro/profil-numeutilizatorx
Fisierul meu cu acest cod se numeste profil.php
Codu este:
Cod: Selectaţi tot
<?php session_start();
ini_set('display_errors',1);
error_reporting(E_ALL);
include('meniu-sus.php');
$id = $_SESSION['id'];
$sql="SELECT `id`, nume, idm, tara, oras, zi_nastere, luna_nastere, an_nastere, sex, stare, interes, descriere, dtreg, dtvisit FROM `membri` WHERE `id`='$id' LIMIT 1";
$rezultat = mysql_query($sql);
if (mysql_num_rows($rezultat) == 0) {}
else {
while ($rand = mysql_fetch_assoc($rezultat)) {
echo '
<html>
<head>
<title>Profilul lui '.$rand['nume'].' din '.$rand['oras'].', '.$rand['tara'].'</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon/0.gif">
<meta name="description" content="Profilul lui '.$rand['nume'].' din '.$rand['oras'].', '.$rand['tara'].'" />
<meta name="keywords" content="'.$rand['nume'].', '.$rand['oras'].', '.$rand['tara'].', '.$rand['stare'].', '.$rand['interes'].', '.$rand['sex'].'" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta name="resource-type" content="document" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="revisit-after" content="5 days" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<meta name="robots" content="ALL" />
<meta name="robots" content="index, follow" />
<meta name="language" content="RO" />
<meta name="doc-class" content="Completed" />
<meta name="doc-rights" content="Copyrighted Work" />
<meta name="Copyright" content="(c) 2013 ScapaDePlictiseala Romania" />
<meta name="Rating" content="General" />
<meta name="Owner" content="ScapaDePlictiseala Romania" />
<base href="http://www.scapadeplictiseala.tk/" />
</head>
<body>
<table border=0><tr><td bgcolor=#eeeeee width=310 height=300>
<img src="/poza-profil/'.$rand['id'].'.jpg" border=1 width=290 height=290>
<br><br>
<b>Informatii generale</b>
<br><br>Despre '.$rand['nume'].':
<br>"<b> '.$rand['descriere'].' </b>"
<br><br>Interesat(a) de :<b> '.$rand['interes'].' </b>
<br>Stare:<b> '.$rand['stare'].' </b>
<br>Sex:<b> '.$rand['sex'].' </b>
<br>Data nasterii:<b> '.$rand['zi_nastere'].'-'.$rand['luna_nastere'].'-'.$rand['an_nastere'].' </b>
<br>Pe site din data de:<b> '.$rand['dtreg'].' </b>
<br><br><b>Date de contact</b>
<br><br>ID de Messenger: <a href=ymsgr:addfriend?'.$rand['idm'].'><img src=http://opi.yahoo.com/online?u='.$rand['idm'].'&t=0> '.$rand['idm'].'</a>
</td><td>
<font size=4 color=green><b>'.$rand['nume'].'</b></font><br>
Traieste in <b>'.$rand['tara'].'/'.$rand['oras'].'</b> <img src=/imagini/stare.png> '.$rand['stare'].' <img src=http://opi.yahoo.com/online?u='.$rand['idm'].'&t=0> <a href=ymsgr:addfriend?'.$rand['idm'].'>'.$rand['idm'].'</a>
<br> <img src=/imagini/statistici.png>ultima logare: '.$rand['dtvisit'].'
</td></tr></table>';
}
}
include('reclama-jos.php');
include('meniu-jos.php');
?>
</body>
</html>