Forum: PHP Jan 14th, 2007 |
| Replies: 2 Views: 2,190 How about something like:
select count(*)
from students
where total_raised > (select total_raised from students where uid=$uid)
This should tell you how many students have total_raised... |
Forum: PHP Jan 11th, 2007 |
| Replies: 15 Views: 13,756 While a form using the post method is less obvious then the ?id=xyz in the url, they're both just as hackable. If you want to verify (assuming you're running windows), check out Microsoft Fiddler,... |
Forum: PHP Jan 10th, 2007 |
| Replies: 15 Views: 13,756 No problem! FYI, you can pass multiple variables by doing:
whatever.php?id=5&variable2=whatever&xyz=aaa |
Forum: PHP Jan 9th, 2007 |
| Replies: 15 Views: 13,756 Just build each link like:
<a href='editform.php?id=53'>John Doe</a> |
Forum: PHP Jan 2nd, 2007 |
| Replies: 5 Views: 5,491 Maybe use something in javascript along the lines of:
function validateImage(url){
var img = new Image();
img.src = url;
return img.height>0;
}
which should return true if the image... |
Forum: PHP Dec 12th, 2006 |
| Replies: 7 Views: 1,637 Smarty (http://smarty.php.net) is a pretty good templating system that you can use as part of a flat file db system. You'll still need to store the editable data somewhere -- flat file or db -- and... |
Forum: PHP Dec 2nd, 2006 |
| Replies: 2 Views: 80,315 Here's one, although the latest version is not yet available
http://whitefyre.com/poxy/ |
Forum: PHP Nov 29th, 2006 |
| Replies: 8 Views: 2,530 Well, I'm not at all familiar with XFORMS, but you can use (assuming you're under Windows) Microsoft Fiddler to examine the data transferred. You can pick up the headers that are normally sent from... |
Forum: PHP Nov 26th, 2006 |
| Replies: 1 Views: 1,659 The mysqli code is causing a fatal error (not sure that it's available in PHP 4.x), and stopping the rest of the script from executing. If you remove the "@" from in front of the line, you will see... |
Forum: PHP Nov 25th, 2006 |
| Replies: 2 Views: 1,333 What database software are you using? Some have full text search capabilities which are quite neat. You could search for "styles" or "styling", and it would match "Style", because they're related.... |
Forum: PHP Nov 4th, 2006 |
| Replies: 5 Views: 1,731 well, all you need to keep track of then is the sum and the number of ratings so that you when you get a new rating, you'd just do
UPDATE ratings SET sumRatings=sumRatings+{$newRating},... |
Forum: PHP Oct 29th, 2006 |
| Replies: 6 Views: 8,378 yup, either way is probably fine -- whichever way works.. I can't see any benefits of doing it one way or the other |
Forum: PHP Oct 28th, 2006 |
| Replies: 6 Views: 8,378 check out php's array_values function, which will essentially reindex the arrays |
Forum: PHP Oct 19th, 2006 |
| Replies: 3 Views: 1,739 Using Microsoft Fiddler (great program for some debugging and such!), I can see that your server is indeed doing what Puckdropper said .. no content type in the header.
Your server's return... |
Forum: PHP Oct 15th, 2006 |
| Replies: 6 Views: 2,207 Well, what would you like to do when the feed is not available? I'm assuming that there is something else that the page will display... You're on the right track, basically (without knowing more... |
Forum: PHP Oct 15th, 2006 |
| Replies: 2 Views: 1,361 First Issue:
You can use:
list($month,$day,$year)=preg_split("/[,\s]/",$date); // (untested!)
or you can use the strtotime() function, which will convert it to a php datetime, and then do... |
Forum: PHP Oct 14th, 2006 |
| Replies: 1 Views: 2,647 I think the standard way is to check the file extension, or to check the mime type.
Of course, none of this guarantees that the uploaded file is a valid "audio" file. (What is an audio file for... |
Forum: PHP Oct 14th, 2006 |
| Replies: 6 Views: 2,732 ...or in php use setcookie (http://ca3.php.net/manual/en/function.setcookie.php)
I'm assuming you're looking for the PHP code =) |
Forum: PHP Oct 3rd, 2006 |
| Replies: 6 Views: 5,603 If you wanted to use php functions to do the validation (say against database entries and such), then you might want to consider using an ajax library such as xajax, and make it look spiffy using... |
Forum: PHP Oct 1st, 2006 |
| Replies: 1 Views: 1,127 Silly question, but do you want SAM to be the only valid response? As written above, SAM will always return the error message, and anything else (even if MSelect is not specified) will continue... |
Forum: PHP Sep 30th, 2006 |
| Replies: 2 Views: 1,738 Actually, if you have
<?php
header('Content-type: application/msword');
header('Content-Disposition: attachment; filename="file.doc"');
readfile('file.doc');
?> |