homers Posted September 13, 2009 Report Share Posted September 13, 2009 Tatad googlē atrādu vēlamo skriptu viss aizgāja kamēr nepieslēdzu datubāzi. Tatad rekur skripts <?php $con = mysql_connect("localhost", "root", "******"); $db = mysql_select_db("rpg", $con); $a = $_GET['user']; $af= mysql_query("SELECT vecums FROM lietotaaji WHERE vaards=$a"); $vecums = $af[0]; header("Content-type: image/png"); $im = imagecreate(315, 65); $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 0); imagestring($im, 3, 0, 0, $vecums, $textcolor); imagepng($im); ?> Gribu uzvilkt lietotaja informāciju, bet man rada vienkarši baltu lapu. Kāds var pateikt kas pa vainu? Quote Link to comment Share on other sites More sharing options...
waplet Posted September 13, 2009 Report Share Posted September 13, 2009 tev gd2 ir ieslēgts? Quote Link to comment Share on other sites More sharing options...
homers Posted September 13, 2009 Author Report Share Posted September 13, 2009 Kur tādu uz xampp var ieslēgt? :D Quote Link to comment Share on other sites More sharing options...
waplet Posted September 13, 2009 Report Share Posted September 13, 2009 php.ini failā pie ;extension=gd2.dll nevajag ķeksim būt priekšā Quote Link to comment Share on other sites More sharing options...
homers Posted September 13, 2009 Author Report Share Posted September 13, 2009 Bija jau bez tā ķekša Quote Link to comment Share on other sites More sharing options...
Val Posted September 13, 2009 Report Share Posted September 13, 2009 Vaina ir šajās rindās. $a = $_GET['user']; $af= mysql_query("SELECT vecums FROM lietotaaji WHERE vaards=$a"); $vecums = $af[0]; pārējās pārbaudes piedzejosi pats $a = isset($_GET['user']) ? mysql_real_escape_string($_GET['user']) : ''; $af = mysql_query("SELECT vecums FROM lietotaaji WHERE vaards='$a'"); list($vecums) = mysql_fetch_row($af); Quote Link to comment Share on other sites More sharing options...
homers Posted September 13, 2009 Author Report Share Posted September 13, 2009 (edited) <?php $con = mysql_connect("localhost", "root", "dsdsata"); $db = mysql_select_db("rpg", $con); $a = isset($_GET['user']) ? mysql_real_escape_string($_GET['user']) : ''; $af = mysql_query("SELECT vecums FROM lietotaaji WHERE vaards='$a'"); list($vecums) = mysql_fetch_row($af); $vecums = $af[0]; header("Content-type: image/png"); $im = imagecreate(315, 65); $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 0); imagestring($im, 3, 0, 0, $vecums, $textcolor); imagepng($im); ?> uzliku šadi, tapat balta lapa Edited September 13, 2009 by homers Quote Link to comment Share on other sites More sharing options...
ziemelis Posted September 13, 2009 Report Share Posted September 13, 2009 izdzes to rindu hader(...); , redzesi kas par kludu Quote Link to comment Share on other sites More sharing options...
Val Posted September 13, 2009 Report Share Posted September 13, 2009 šito nafig... $vecums = $af[0]; Quote Link to comment Share on other sites More sharing options...
homers Posted September 14, 2009 Author Report Share Posted September 14, 2009 izdzes to rindu hader(...); , redzesi kas par kludu Tagad rada simblous: ‰PNG IHDR;A”Ü‘—PLTEÿÿÿUÂÓ~IDATxœíÁ1 õOm ? à` i;³àIEND®B`‚ Quote Link to comment Share on other sites More sharing options...
Val Posted September 14, 2009 Report Share Posted September 14, 2009 nu bet loģiski :D 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.