Autor Zpráva
Mikeses
Profil
nechapem tento warning Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\inc\profil.inc on line 4

kde
<?php 
if (isset($_COOKIE["prihlasen"])) {
$profil1=mysql_query("select * from redirect where id=$id");
while ($profil=MySQL_Fetch_Array($profil1)) 
{
?>
Enyeus
Profil
Napiš id='$id'
Ten warning znamená, že máš chybu v SQL dotazu.
Mikeses
Profil
zkouišel sem a nejde

nenapise nic ani warning ani obsah
Enyeus
Profil
Třeba tam nemáš ten řádek s id.
Zkus si vypsat
echo mysql_num_rows($profil1);
Mikeses
Profil
Enyeus:
Třeba tam nemáš ten řádek s id.
Zkus si vypsat 1
echo mysql_num_rows($profil1);

0
Enyeus
Profil
Tak tam prostě ten řádek s dotyčným id neexistuje.
Mikeses
Profil
existuje... ma to brat id z url adresy ae proste nebere
RockFire
Profil
Zkus to napsat správně

$profil1=mysql_query("select * from redirect where id='".$id."'");
Johnik
Profil
Mikeses:
existuje... ma to brat id z url adresy ae proste nebere
Tak jestli z adresy, tak:
$profil1=mysql_query("select * from redirect where id='".$_GET['id']."'");
Mikeses
Profil
funguje thx

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0