Jump to content

darkfreaks

Members
  • Posts

    4,953
  • Joined

  • Last visited

Everything posted by darkfreaks

  1. in your query try adding ORDER BY 'level'
  2. put the top part into your code it will make the checkboxes check
  3. please post the php code here so we can help
  4. <?php while (list ($key,$val) = @each ($box)) { echo "$val,"; } ?> <input type=checkbox name=box[] value='Mathew'>
  5. try doing ($title,$j)
  6. Try: <table width="100%" border="0" cellspacing="0" cellpadding="3"> <tr> <td><form action="" method="get"> <select name="menu1" onChange="MM_jumpMenu('parent',this,0)"> <option value="">Select Layout Type</option> <?php $fetch = mysql_query("SELECT * FROM layout_cats"); while( $row = mysql_fetch_array($fetch) ){ ?> <option value="<? echo ("$url"); ?>index.php?app=layouts&action=cats&id=<?=$row->id?>"><?=$row->name?></option> <?php } ?> </select> </form></td> </tr> </table> <?php $fetch = mysql_query("SELECT * FROM layout_cats WHERE id=$id ORDER BY id DESC"); $cat = mysql_fetch_array($fetch); $seo_title = $sitename." - ".$cat->name." Layouts"; ?> <h1><?=$cat->name?> Layouts</h1> <?php $fetch2 = mysql_query("SELECT * FROM layouts WHERE cat_id=$id AND published='1' ORDER BY id DESC"); while( $row = mysql_fetch_array($fetch2) ){ ?>
  7. From what i saw your script was working correctly? what exactly do you mean it isnt adding up right? ???
  8. i dont understand ???
  9. imagecreatefrompng(captcha.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory on line 19 of captcha.php what exactly is wrong on this line? someone told me i need to change the path what path?
  10. try: <?php $price= $_SESSION['price']; print_r ($price); ?>
  11. ok what do i put for $captcha = imagecreatefrompng("captcha.png"); i have the background picture in the same folder. i dont see how the path could be wrong.
  12. look it up on php.net
  13. anyone?
  14. i pmed you on yahoo but no response
  15. Try: <?php $username="php"; $password="ironpass"; $database="userlist"; $table="login"; $connectmysql="mysql_connect(localhost,$username,$password)"; if (!isset($_POST['loggedin'])) { echo "<a>please log in[/url] <form method='post'> Username:<input type='text' name='username'> Password:<input type='text' name='password'> <input type='submit' name='loggedin' value='Log In'><a href='resister.php'>Register here[/url]"; }elseif{ (isset($_POST['loggedin'])) $user="$_POST['username']"; $userpass = "$_POST['password']"; $query1="SELECT*FROM login"; $query2="SELECT*FROM login WHERE username='$user'"; $query3="SELECT*FROM login WHERE username='$userpass'"; $result1="mysql_query($query1)"; $result2="mysql_query($query2)"; $result3="mysql_query($query3)"; $connectmysql mysql_select_db($database) or die("unable to select database"); if($user == $query2) { if($userpass == $query3) { echo "Thank you for logging in"; setcookie ["$user ","$userpass "]; } } } elseif($_COOKIE['user'] == $userpass) { echo "Welcome $user Enjoy the site"; } ?>
  16. Try: <?php require_once 'appinclude.php'; $con = mysql_connect("myhost","myaccount","mypassword"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydatabase", $con); $result = mysql_query("SELECT * FROM members WHERE id='$user'"); $row = mysql_fetch_assoc($result); $attackroll = $row['attackroll']; $defendroll = $row['defendroll']; $defendwin = $defendroll-$attackroll; $attackwin = $attackroll-$defendroll; $attackerpower = $row['attackpower']; $defendpower = $row['cpudefense']; $defendupdate = $attackerpower-$defendwin; $attackupdate = $defendpower-$attackwin; $numbattacker = rand(1,6); $numbdefender = rand(1,6); echo "you rolled a $numbattacker The enemy rolled a $numbdefender <br />"; $query = "UPDATE members SET attackroll = '$numbattacker' WHERE id='$user'"; mysql_query($query); $query = "UPDATE members SET defendroll = '$numbdefender' WHERE id='$user'"; mysql_query($query); mysql_fetch_assoc($result); if ($attackroll<$defendroll){ echo "you lose"; $query = "UPDATE members SET attackpower = '$defendupdate' WHERE id='$user'"; mysql_query($query); mysql_fetch_assoc($result);} if ($attackroll>$defendroll){ echo "you win!"; $query = "UPDATE members SET cpudefense = '$attackupdate' WHERE id='$user'"; mysql_query($query); mysql_fetch_assoc($result);} ?>
  17. Like jesirose suggested take the "" out.
  18. try <?php $attackroll = $row[attackroll]; $defendroll = $row[defendroll]; $defendwin = $defendroll-$attackroll; $attackwin = $attackroll-$defendroll; ?>
  19. im not going to argue there some of my scripts use if file exists
  20. no i was still right he was just missing 2 terminators in his code so he got errors
  21. instead of include or require try require_once or include_once Try this was missing a ; at the end of the if statement <?php $success = @require("mscript.php"); if (!$success){ die('unable to access MScript'); } $local_pass = "off"; //not active yet $local_mode = "open"; @require("mscript.php"); ?>
  22. what is line 12?
  23. <?php $success = @require("mscript.php"); if (!$success) { die('unable to access MScript') } $local_pass = "off"; //not active yet $local_mode = "open"; @require("mscript.php") ?>
  24. dont ya mean mysql_num_rows ?
  25. ok i found the problem the settings file already had that code in it so i removed session_start; now i gotta do the same with captcha.php also done with that now the remaining ERROR: imagecreatefrompng(captcha.png) [function.imagecreatefrompng]: failed to open stream: No such file or directory on line 19 of captcha.php imagecolorallocate(): supplied argument is not a valid Image resource captcha.php on line 26 captcha.php imageline(): supplied argument is not a valid Image resource captcha.php line 34 imagestring(): supplied argument is not a valid Image resource captcha.php line 41 imagepng(): supplied argument is not a valid Image resource captcha.php line 56
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.