Jump to content
php.lv forumi

query


FT3

Recommended Posts

labdien te tada lieta uzkodeju kodu bet , rada tukšu lapu kas nepareiz, k0 lai dara ?

 

phpmyadmin screen :

90411cdd7eg728es8qu_thumb.jpg

 

pats kods :

<?php
include("includes/connect.php");

if(is_numeric($_GET['id']))
{
$id = intval($_GET['id']);

$query = "SELECT * FROM users WHERE id = '$id'";

$result = mysql_query($query) or die(mysql_error());

$row = mysql_fetch_array($result) or die(mysql_error());

echo "Username:";
echo $row['username'];
echo "<br />";
echo "Your password:";
echo $row['password'];
echo "<br />";
echo "Your Avatar:";
echo $row['avatar'];
echo "<br />";
echo "Your Group";
echo $row['group'];

}

?>

 

Iepriekš paldies !

Ja Nezini Tad Neposto ! xD

Link to comment
Share on other sites

tu izteicies - ka redzi baltu lapu.

 

bet ka tu kautko ieraudzisi ja tu nepadod id?

jo,

 

if(..id..){

tavs kods

}

 

sakot raksti adrese arii id ?id=1 tu saki ka ne ta.

bet ja tu neieraksti ?id=1 kas ir attiecinams uz if(..id..) { saturs kuru radis ja bus ievadits id } tad tu neko neredzi , jo tev nav else statementa.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...