-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
does this display null ? $game_time = $row['game_time']; var_dump($game_time); //add this line
-
post your attempt and were take a look
-
Dynamically populating listboxes based on previous selection
MadTechie replied to tlavelle's topic in PHP Coding Help
search the form, this has been ask 3 times in the last week! -
its a Variable variable see manual
-
is this file ran directly ? or included or open'd via any other process (other than via the browser url)
-
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']
-
[SOLVED] need alternative to oci_fetch_array for PHP 4
MadTechie replied to rbragg's topic in PHP Coding Help
would $hall be $hall['user'] ? -
probably a mod_rewrite
-
it can be done, just have php script echo the details of the array.. also this is JavaSCRIPT not JAVA..
-
php?id=xxx <--this is using wat kind of method?
MadTechie replied to zgkhoo's topic in PHP Coding Help
its passing a html parameter! this isn't a tutorial site -
[SOLVED] please can anyone see what is wrong with this
MadTechie replied to jeppers's topic in PHP Coding Help
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> -
php?id=xxx <--this is using wat kind of method?
MadTechie replied to zgkhoo's topic in PHP Coding Help
erm. combine these http://www.w3schools.com/php/php_get.asp http://www.w3schools.com/php/php_switch.asp -
if `ticket_deadline_date` is a timestamp then you could use blarr blarr "`ticket_deadline_date` < ".time()+(24*60*60)." order blarr blarr
-
php?id=xxx <--this is using wat kind of method?
MadTechie replied to zgkhoo's topic in PHP Coding Help
the GET method ! -
the problem is possible the down to the error not reported Echo $UserID Echo $HouseType notice the lack of ;
-
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());
-
[SOLVED] please can anyone see what is wrong with this
MadTechie replied to jeppers's topic in PHP Coding Help
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 ?> -
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());
-
[SOLVED] please can anyone see what is wrong with this
MadTechie replied to jeppers's topic in PHP Coding Help
WHAT!!!! read thorpe's post -
its my coding style
-
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
-
its not a quote is a "backtick" its the MySQL identifiers quote character.. i am talking about MySQL reserved words
-
note: remove the rmdir( $dir ); at the end of the code if you wish to keep the folder itself but remove the files inside
-
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
-
<?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; } ?>