Puika1 Posted November 25, 2009 Report Share Posted November 25, 2009 piem es uztaisiju scriptu,ka no datubazes izelk noteiktus laukus piemeram vards uzvards utt ka es varu uztaisit lai nemtu lietotaju pec vina id ka piemeram seit (lietotajs.php?id=2) Reku ir pats scripts,tiko saku neka diza nau <? mysql_connect("localhost", "dsfdsfdsf", "dsfdsfsdf"); mysql_select_db("fdsfsdf"); $result = mysql_query("SELECT * FROM ibf_members"); while($r = mysql_fetch_array($result)) { echo $r['name']; echo "<br />"; echo $r['email']; echo "<br />"; echo $r['mgroup']; } ?> Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 25, 2009 Report Share Posted November 25, 2009 $result = mysql_q uery("SE LECT name, email, mgroup FROM ibf_me mbers WHERE lietotajid = " . intval($_GET'id'])); Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 25, 2009 Author Report Share Posted November 25, 2009 (edited) KLUDA Parse error: syntax error, unexpected T_STRING in /home/machoo/public_html/profile.php on line 5 BET paldies vairs nevaig pats tiku gala ar citu veidu :) Edited November 25, 2009 by Puika1 Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted November 25, 2009 Report Share Posted November 25, 2009 Kāds ir tas veids? Manā kodā bija liekas atstarpes dēļ IDS. Quote Link to comment Share on other sites More sharing options...
Puika1 Posted November 25, 2009 Author Report Share Posted November 25, 2009 $id = $_GET['id']; $id = mysql_real_escape_string($id); Quote Link to comment Share on other sites More sharing options...
mad182 Posted November 25, 2009 Report Share Posted November 25, 2009 Ja parametrs var būt tikai skaitlis, tad vienkāršāk/pareizāk būtu: $id = (int)$_GET['id']; vai $id = intval($_GET['id']); Un nekāda eskeipošana nav vajadzīga. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.