Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. thats what i thought until then a script with no globals except a super global $_FILES !! ??? maybe a misunderstanding of what register_globals is!
  2. either <?php if ($pass == "") { $password = "X"; }else{ $password = $pass ; } echo "$password" ; ?> or <?php $password = $pass ; if ($pass == "") { $password = "X"; } echo "$password" ; ?> or <?php $password = $pass ; if (empty($pass)) { $password = "X"; } echo "$password" ; ?>
  3. Probably some bugs in their but its a start... <?php session_start(); $md5 = md5(microtime() * mktime()); $string = substr($md5,0,5); ?> <form action="check.php" method="post"> <input name="code" type="text" /> <img src="captcha.php" /> </form> captcha.php (the imagefile) <?php $captcha = imagecreatefrompng("./captcha.png"); $black = imagecolorallocate($captcha, 0, 0, 0); $line = imagecolorallocate($captcha,233,239,239); imageline($captcha,0,0,39,29,$line); imageline($captcha,40,0,64,29,$line); imagestring($captcha, 5, 20, 10, $string, $black); $_SESSION['key'] = md5($string); header("Content-type: image/png"); imagepng($captcha); ?> check.php <?php session_start(); if(md5($_POST['code']) != $_SESSION['key']) { die("Error: You must enter the code correctly"); }else{ echo 'You entered the code correctly'; } ?>
  4. to use www.example.com/index.php?t=23433&e=1122test echo $_GET['t'];//returns 23433 echo $_GET['e'];//returns 1122test of course it doesn't have to be echo!
  5. Erm.. are you talking about Super global or register globals? why would super globals be off ? (infact i didn't know you could turn superglobals off) if you mean register globals then you can use $_FILES
  6. 12:00am is 00:00:00 so theirs no time set in the table maybe change <?php $game_time = $row['game_time'] if ($game_time == '00:00:00') { echo "TBA" ; } else { echo $game_time ; } to $game_time = $row['game_time']; if(date("Ymd", $game_time) == 00000000) { $game_time = "TBA"; }
  7. $game_time = $row['game_time'] to $game_time = $row['game_time'];
  8. starting point imagecopymerge EDIT: User Contributed Notes are useful
  9. to handle arrays do this $_SESSION['answer'][$count] = ""; echo $_SESSION['answer'][$count] think of $_SESSION['answer'] as you would $answer common problems with SESSION are due to the fact their headers see this post
  10. so www.x.com/home/health/ ../ (back one) www.x.com/home/ ../ (back one) www.x.com/ then forward scripts/visitors/comments/connect.php <?php include("../../scripts/visitors/comments/connect.php"); ?>
  11. for <?php include ("http://www.x.com/home/index.php"); ?> to work, your need allow remote include to be turned on in the php.ini allow_url_include On this directive did not exist until php 5.2.1 1) you cannot use it with versions prior to 5.2.1 2) You’ll need to add it to your php.ini, as you probably won’t find it in there already 3) allow_url_fopen has to be enabled 4) This has to be in the php.ini server-side, and not the .htaccess
  12. Erm.. OK as YOU are in the process of creating or changing this user login system to a user management system. why did you post here.. also i don't see the "Problem".. were not here to do the work for you...! try the freelance section
  13. what about echo "$ceiling_ft"; echo " FT"; to echo "$ceiling_ft"; echo " FT"; echo "<br>";
  14. WHERE `rrn` ='1'
  15. erm.. you may wany to get that code again.. note the one you posted replaced the spaces with
  16. on the form. add some hidden fields or use sessions were need to see some code
  17. is this correct ? $update = "UPDATE `homepage` SET `date` = $date, `comments` = $newcomments WHERE `rrn` = 1"; as i am not going to do all the work..!
  18. check here for reasons why its probably failing
  19. Echo thorpe. perfect reply! google "php dynamic drop down"
  20. please click topic solved (bottom left) if we're done
  21. Read the lesson here and here, this will display both tables SELECT * FROM f2007_scheduling, f2007_division WHERE division='$division' ORDER BY date ASC this will display both tables where division is $division SELECT * FROM f2007_scheduling, f2007_division WHERE f2007_scheduling.division='$division' AND f2007_division.division_id = '$division' ORDER BY date ASC
  22. i assume echo "$comments"; should be echo $row['comments'];
  23. No $division wasn't set, but $division_id was // mySQL Table $division_id = $_GET['division_id']; $sql = "SELECT * FROM `f2007_scheduling` WHERE division='$division' ORDER BY date ASC"; as for joins nice example here
  24. change echo "<form action=\"posthp.php\">"; echo "<textarea name=\"newcomments\" cols=\"100\" rows=\"20\">"; echo "$comments" echo "</textarea>"; echo "<input type="submit" />"; echo "</form>"; to echo "<form action=\"posthp.php\">"; echo "<textarea name=\"newcomments\" cols=\"100\" rows=\"20\">"; echo "$comments"; //ADDED ; echo "</textarea>"; echo "<input type=\"submit\" />"; // " to \" echo "</form>";
  25. erm.. well it uses setcookie that can only be set from the header.. what about an mySQL basket ? i haven't looked at this in detail but the description looks ok
×
×
  • 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.