Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. does this display null ? $game_time = $row['game_time']; var_dump($game_time); //add this line
  2. post your attempt and were take a look
  3. search the form, this has been ask 3 times in the last week!
  4. its a Variable variable see manual
  5. is this file ran directly ? or included or open'd via any other process (other than via the browser url)
  6. not to me! if you have an array in an array you can search part of it like this in_array("blar", myarray['demo']); will search in the array inside myarray['demo']
  7. would $hall be $hall['user'] ?
  8. probably a mod_rewrite
  9. it can be done, just have php script echo the details of the array.. also this is JavaSCRIPT not JAVA..
  10. its passing a html parameter! this isn't a tutorial site
  11. problems where read thorpe's post + if (empty ($_POST['username')) { //MISSING close ] //missing print ' '; ALSO MISSING TYPE <input value="submit" name="submit" value="Register!" /></p>
  12. erm. combine these http://www.w3schools.com/php/php_get.asp http://www.w3schools.com/php/php_switch.asp
  13. if `ticket_deadline_date` is a timestamp then you could use blarr blarr "`ticket_deadline_date` < ".time()+(24*60*60)." order blarr blarr
  14. the problem is possible the down to the error not reported Echo $UserID Echo $HouseType notice the lack of ;
  15. change to this $result = mysql_query("SELECT * FROM `intranet_accounts_tickets` WHERE `recipients_account_id`='".$_SESSION['intranet_user_id']."' AND `ticket_closed`='0' AND `ticket_deleted`='0' AND `ticket_deadline_date` < '".date("j/m/Y, H:i:s")."' ORDER BY `ticket_deadline_date` DESC LIMIT $limitvalue, $limit") or die(mysql_error()); and post the error is any! if the ticket_deadline_date is a date field try $result = mysql_query("SELECT * FROM `intranet_accounts_tickets` WHERE `recipients_account_id`='".$_SESSION['intranet_user_id']."' AND `ticket_closed`='0' AND `ticket_deleted`='0' AND `ticket_deadline_date` < Now() ORDER BY `ticket_deadline_date` DESC LIMIT $limitvalue, $limit") or die(mysql_error());
  16. this works fine (except for the lack of footer.php) fixed a few more errors <?php //reg.php //address error handling ini_set ('display_errors', 1); error_reporting (E_ALL & ~E_NOTICE); //set the page title define ('TITLE', 'register'); //basic html formatting print '<div id="leftcontent"> <h1>Registration Form</h1> <p>Register so that you can take advantage of this, that and other things.</p>'; //check if the form has been submitted if (isset ($_POST['submit'])) { $problem = FALSE; // no problems so far //check each value if (empty ($_POST['username'])) { $problem = TRUE; print '<p>Please enter your username</p>'; } if(empty ($_POST['first_name'])) { $problem = TRUE; print '<p>Plase enter your First Name</P>'; } if (empty ($_POST['last_name'])) { $problem = TRUE; print '<p>Please enter your Last Name</p>'; } if (empty ($_POST['email'])) { $problem = TRUE; print '<p>Please enter your email</p>'; } if (empty($_POST['password1'])) { $problem = TRUE; print '<p>Please enter your Password</p>'; } if ($_POST['password1'] != $_POST['password2']){ $problem = TRUE; print '<p>Your password did not match your confirmed password!</p>'; } if (!$problem) { // if there weren't any probles... print '<p>You are now registered!<br />Okey, you are not really registerd but...</p>'; }else { // forgoten field. print '<p>Please try again!</p>'; } }//end of handle for if //Display the form print '<form action="register.php" method="post"><p>'; print 'Username:<input type="text" name="username" size="20" value="' . $_POST['username'] . '"/><br />'; print 'First Name: <input type="text" name="first_name" size="20" value="' . $_POST['first_name'] . '"/><br />'; print 'Last Name: <input type="text" name="last_name" size="20" value="' . $_POST['last_name'] . '"/><br />'; print 'Email Address: <input type="text" name="email" size="20" value="' . $_POST['email'] . '"/><br />'; print 'Password: <input type="password" name="password1" size="20" /><br />'; print 'Confirm Password: <input type="password" name="password2" size="20" /><br />'; print '<input type="submit" value="submit" name="submit" value="Register!" /></p>'; print '</form>'; //complete the html formatting stuff. print '</div>'; include ('templates/footer.php'); // need the footer ?>
  17. remove the comment if you have a php var in their!! $result = mysql_query("SELECT * FROM `intranet_accounts_tickets` WHERE `recipients_account_id`='".$_SESSION['intranet_user_id']."' AND `ticket_closed`='0' AND `ticket_deleted`='0' ORDER BY `ticket_deadline_date` DESC LIMIT $limitvalue, $limit") or die(mysql_error());
  18. WHAT!!!! read thorpe's post
  19. its my coding style
  20. OK just an idea.. change $SQL = "SELECT field FROM table WHERE field LIKE %http://site1/directory%;"; to $SQL = "SELECT field FROM table;"; so it does all records
  21. its not a quote is a "backtick" its the MySQL identifiers quote character.. i am talking about MySQL reserved words
  22. note: remove the rmdir( $dir ); at the end of the code if you wish to keep the folder itself but remove the files inside
  23. i used `Ownerid` as i wasn't sure if Ownerid is a reserved word.. change it to Ownerid and if it works then its not reserved
  24. <?php function full_rmdir( $dir ) { if ( !is_writable( $dir ) ) { if ( !@chmod( $dir, 0777 ) ) { return FALSE; } } $d = dir( $dir ); while ( FALSE !== ( $entry = $d->read() ) ) { if ( $entry == '.' || $entry == '..' ) { continue; } $entry = $dir . '/' . $entry; if ( is_dir( $entry ) ) { if ( !$this->full_rmdir( $entry ) ) { return FALSE; } continue; } if ( !@unlink( $entry ) ) { $d->close(); return FALSE; } } $d->close(); rmdir( $dir ); return TRUE; } ?>
×
×
  • 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.