Search Results

Showing results 1 to 20 of 20
Search took 0.01 seconds.
Search: Posts Made By: humbug
Forum: PHP Aug 20th, 2009
Replies: 7
Views: 681
Posted By humbug
If you want to update the page without reloading it you will have to use client side scripts such as Javascript. (PHP is a server side language and so all the php is executed before the page is sent...
Forum: PHP Jul 19th, 2009
Replies: 10
Views: 486
Posted By humbug
Holy Moley, you'll hate your self for this :P You forgot a crucial line: mysql_query($sql); which should go on line 16. As your code stands, it doesn't execute the new SQL command, just sets the $sql...
Forum: PHP Jul 19th, 2009
Replies: 20
Views: 1,182
Posted By humbug
The easiest way to do this would be to set a column "lastactivity" to the current time every time the user loads any of your pages (just build it into your authentication script). You can then...
Forum: Database Design Jun 7th, 2009
Replies: 1
Views: 1,007
Posted By humbug
You can use a for loop to operate on each element of the array. I'm assuming it's a one (meaningful) columned table.

//len is length of array
for (i=0; 0<len; i++){
//create SQL statement
...
Forum: PHP Jan 14th, 2009
Replies: 2
Views: 643
Posted By humbug
Using any program that can use sockets you can do this. If you have php installed on your computer then that's easy. I have done it with Game Maker (using 39dll) before.

What you need to do is...
Forum: PHP Dec 23rd, 2008
Replies: 4
Views: 1,197
Posted By humbug
Ok, first off I'd direct my form to a page of my own, say "submit.php", which would store the data passed to it into the database and then (before echoing any data to the page) use header() to...
Forum: PHP Nov 6th, 2008
Replies: 13
Views: 1,981
Posted By humbug
In php, if you try to perform an operation on $start_time (assuming that it is a variable in the script containing a string) it will be used as an integer. It works fine if the string is something...
Forum: PHP Nov 2nd, 2008
Replies: 13
Views: 1,981
Posted By humbug
This is a great method for the date. If you wanted to you could even return "$year - $month - $day"; if it is a valid date or FALSE if it isn't seeing as you already have the variables set.

As for...
Forum: PHP Nov 2nd, 2008
Replies: 10
Views: 896
Posted By humbug
Personally, I would make a few tables like this: (I will refer to email's (eg someone@example.com) as emails and messages between users as Personal Messages (PM's)
table: users

Column: ...
Forum: PHP Nov 1st, 2008
Replies: 6
Views: 690
Posted By humbug
You could store the number in either a txt file (if you don't want to do the mysql connection thing just for it) or in a db and also store the date/time for which that number "expires" and it should...
Forum: PHP Nov 1st, 2008
Replies: 13
Views: 1,981
Posted By humbug
I have just written a script to do just that. I used ereg() (http://au2.php.net/manual/en/function.ereg.php) to do a search for a regular expression that will verify a valid entry. e.g:

if...
Forum: PHP Oct 30th, 2008
Replies: 4
Views: 558
Posted By humbug
echo " </tr>\n";
echo " <tr>\n";
echo " <td class=\"hotelinfotext\">
if ($row[NonSmoking] == 1) {
echo 'Non smoking rooms available, ';
}
if ($row[AirCon] == 1) {
echo 'Air conditioning,...
Forum: PHP Oct 30th, 2008
Replies: 11
Views: 2,550
Posted By humbug
I guess that because your printing a receipt and you don't need an images, TEXT would probably be the best option (If it works just as well). Faster printing would indicate it's doing less work which...
Forum: PHP Oct 30th, 2008
Replies: 11
Views: 2,550
Posted By humbug
Ok, that makes sense I guess.

What about the other tests? There has to be a character that will mean "new line" and I'm guessing that if "\n" won't work then "\r\n" will.
Forum: PHP Oct 29th, 2008
Replies: 11
Views: 2,550
Posted By humbug
Also check that (http://au2.php.net/manual/en/function.printer-set-option.php) out. Someone said that PRINTER_MODE must be set to "RAW" for printing to work... don't quite know what was meant but...
Forum: Game Development Oct 29th, 2008
Replies: 10
Views: 1,788
Posted By humbug
Unless you are using someone else's stuff in your game you should be fine with copyright. Careful submitting your game to certain sites as you might be giving them copyright permissions that you...
Forum: PHP Oct 29th, 2008
Replies: 11
Views: 2,550
Posted By humbug
Check out this (http://www.tizag.com/phpT/files.php) and look into getting the entire file into a variable with "\n\r" (linefeed and carriage return) separating each line of text. Alternatively write...
Forum: PHP Oct 29th, 2008
Replies: 11
Views: 2,550
Posted By humbug
So you want to physically print the contents of receipt.txt? What method are you using to print the first line?
Forum: PHP Oct 26th, 2008
Replies: 6
Solved: code mess-up
Views: 933
Posted By humbug
Sorry, I'm not familiar with that method of MySql interaction. It looks to me like there's something going wrong near the start (maybe with $stmt=mysqli_prepare($cxn, $q);
or even before?) that...
Forum: PHP Oct 16th, 2008
Replies: 6
Solved: code mess-up
Views: 933
Posted By humbug
This is the first thing I've spotted (as you can see, the whole things inside the quotes):
echo "<tr bgcolor=\"' . $bg . '\">\n";
this will echo:
<tr bgcolor="' . #ffffff . '">\n
(where #ffffff...
Showing results 1 to 20 of 20

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC