Forum: PHP Mar 8th, 2009 |
| Replies: 4 Views: 384 If you like finding new functions, you should definitely take a look at the php function reference (http://www.php.net/manual/en/funcref.php). By the way, I love discovering things in languages too. |
Forum: PHP Mar 4th, 2009 |
| Replies: 8 Views: 1,584 To quote myself for emphasis:
In the page inside the iframe, thoroughly check the css file requested. I would make sure it is one of a select number of specific filenames, rather than checking... |
Forum: PHP Mar 3rd, 2009 |
| Replies: 8 Views: 1,584 Well since this is a PHP forum, i'll give you a PHP solution. You could pass the css file for the iframe to use in the url like so:
<iframe id="pframe" width="'.$game['iframewidth'].'"... |
Forum: PHP Mar 1st, 2009 |
| Replies: 3 Views: 933 A good way to implement this is giving each subcategory a reference (field) to the parent category's unique ID. You can do this with an auto-incrementing int field. A root category can just have the... |
Forum: PHP Feb 26th, 2009 |
| Replies: 10 Views: 1,135 Do you already have the part of the query that matches the site? Add to that (with an AND clause) a MATCH(field) AGAINST('value') as demonstrated in the link I gave you. |
Forum: PHP Feb 26th, 2009 |
| Replies: 10 Views: 1,135 Try looking at this page (http://hudzilla.org/phpwiki/index.php?title=Advanced_text_searching). |
Forum: PHP Feb 26th, 2009 |
| Replies: 18 Views: 3,713 Oh wow, how did I miss that part? Sorry 'bout that one. |
Forum: PHP Feb 26th, 2009 |
| Replies: 4 Views: 962 I would assume you know how to create forms already. Have the login button send an AJAX request (by calling some JS in the onClick event handler) to a separate PHP login script (passing the username... |
Forum: PHP Feb 26th, 2009 |
| Replies: 18 Views: 3,713 Honestly, you have been given the proper solutions. Sending (and therefore, reading) your forms with the POST method sends variables through the headers sent. For this purpose, however, I would... |
Forum: PHP Feb 26th, 2009 |
| Replies: 6 Views: 634 For the sake of an installation script, you should probably exit() after redirecting. As to why this isn't happening is beyond me. |
Forum: PHP Feb 26th, 2009 |
| Replies: 6 Views: 634 Just out of curiosity, does this mean that scripts are loaded into the PHP interpreter in their entirety, so that anything can happen to the file during execution and the its execution will be... |
Forum: PHP Feb 24th, 2009 |
| Replies: 2 Views: 2,137 Yep, Ajax (http://w3schools.com/ajax/). Its amazing how often this is asked in the PHP forum, maybe there should be a sticky... |
Forum: PHP Feb 19th, 2009 |
| Replies: 3 Views: 588 Well, does the Clients table have a field named propID? |
Forum: PHP Feb 17th, 2009 |
| Replies: 6 Views: 647 You are adding two boundaries for each file. Move your second boundary addition outside of the loop. |
Forum: PHP Feb 16th, 2009 |
| Replies: 6 Views: 647 I can't see how this would work even with one file; there are no PHP tags! Furthermore, can you describe what doesn't work when you input two files? Actual PHP errors, or it doesn't add one/both to... |
Forum: PHP Feb 16th, 2009 |
| Replies: 7 Views: 482 Are you familiar with databases? Databases contain tables, tables contain records, or "rows". Each row has multiple "columns" of data. I am saying that each record should have information stored for... |
Forum: PHP Feb 16th, 2009 |
| Replies: 7 Views: 482 Each mysql record is one message, contains the message body, title, time etc. and the users it is to and from. The user fields would optimally be references to the ids inside a user table. You can... |
Forum: PHP Feb 16th, 2009 |
| Replies: 2 Views: 583 I learned so much from this (http://hudzilla.org/phpwiki/index.php?title=Main_Page) tutorial. |
Forum: PHP Feb 16th, 2009 |
| Replies: 4 Views: 291 Very true. You can't send header information (thats where you're redirecting) after outputting anything. All you could do is put your meta tags after the redirection code. That would be useless... |
Forum: PHP Feb 15th, 2009 |
| Replies: 9 Views: 660 So you want to provide a common portal to all three sites within your own? Use Sockets (http://us.php.net/manual/en/function.fsockopen.php) to connect to their servers, get the page you want (while... |
Forum: PHP Feb 15th, 2009 |
| Replies: 13 Views: 651 @Blocker: You keep saying it doesn't run. What does that mean exactly? PHP errors? Or does it always disable the button? Does it never disable the button? It helps to be as specific as possible. |
Forum: PHP Feb 15th, 2009 |
| Replies: 15 Views: 814 Yes, one use came to mind immediately. It is great for making messy code! The knowledge that it is a poor practice has been know widespread for decades. So why is your case is an exception? |
Forum: PHP Feb 14th, 2009 |
| Replies: 4 Views: 614 -Use code tags so I can see where line 16 is
-Why are you performing the same query twice? $q_user is essentially the same is $query
-You should check that the query result ($q_user) is not false... |
Forum: PHP Feb 14th, 2009 |
| Replies: 6 Views: 590 What does it say in the address bar? If it says "C:\Program Files\Apache Group\Apache2\cgi-bin\filename.php" then you aren't running it through your server. It is not being parsed as PHP. You have to... |
Forum: PHP Feb 13th, 2009 |
| Replies: 8 Views: 1,019 You're not displaying anything. Unless there's more to the code on this page, I don't see a single output statement. |
Forum: PHP Feb 13th, 2009 |
| Replies: 15 Views: 814 Goto statements lead to spaghetti code (http://en.wikipedia.org/wiki/Spaghetti_code). Very quickly. |
Forum: PHP Feb 13th, 2009 |
| Replies: 4 Views: 316 No hard feelings. You should mark this as solved, however. It makes a difference. |
Forum: PHP Feb 13th, 2009 |
| Replies: 4 Views: 316 I hope you mean "can't save .php files"! And I hope you're lying, because you can save a file with any file type you want :\ |
Forum: PHP Feb 13th, 2009 |
| Replies: 8 Views: 1,019 Yes, thats the whole point of sessions; they last across all pages in your site until they expire or the browser is closed.
It looks to me like you would put it in here:
$query_recstudinfo =... |
Forum: PHP Feb 13th, 2009 |
| Replies: 4 Views: 429 Alignment like notepad, add styles? Your question is way too vague for anyone to know how to help you. Some details would be quite useful! |
Forum: PHP Feb 13th, 2009 |
| Replies: 7 Views: 650 Answers to other questions:
2. Javascript sessions? They don't exist (or it would be a horrible shock if i discovered they do!)
3. Yep! Something like this:
$script = <<<END
<script... |
Forum: PHP Feb 12th, 2009 |
| Replies: 9 Views: 463 @Shawn: I felt like I had to check out vim, and I really like it. It is tricky to learn but seems much more efficient than conventional methods. Plus its very "old-school" which I generally like. |
Forum: PHP Feb 12th, 2009 |
| Replies: 15 Views: 1,918 If you are too stubborn to accept that timestamps are in fact better or are too lazy to make the change, it would look like this:
$parts = explode("-",$birthday);
$yeah = $parts[0];
$month =... |
Forum: PHP Feb 12th, 2009 |
| Replies: 15 Views: 1,918 If you store the birthdays as timestamps rather than strings it is very easy. Something like this would do:
// $birthday has been selected from the database
if($birthday > time() && $birthday -... |
Forum: PHP Feb 12th, 2009 |
| Replies: 9 Views: 463 I'm loving Notepad++ with the FTP plugin so I can work on my hosted server within the greatest editor ever. |
Forum: PHP Feb 12th, 2009 |
| Replies: 15 Views: 1,918 1. Use code tags.
2. Use time stamps (functions like mktime, date, etc.) this will make comparing dates much easier.
3. Don't declare functions within control structure. Its just a bizarre practice. |
Forum: PHP Feb 12th, 2009 |
| Replies: 9 Views: 457 If you go back to the origional code you posted, a quick fix would be to quit program execution after outputting that message. So you could change that section to:
//Let the user know everything... |
Forum: PHP Feb 11th, 2009 |
| Replies: 24 Views: 969 <td width=""><p><?php echo wordwrap($message, 75, "<br />", true); ?></p></td> Change 75 to whatever width you want. |
Forum: PHP Feb 11th, 2009 |
| Replies: 9 Views: 566 Well you can just have records containing any information you want (titles, descriptions, date of event). When displaying the events in a category, just check the current date against the event date... |
Forum: PHP Feb 10th, 2009 |
| Replies: 3 Views: 324 From what I have seen, Daniweb is not a place for hiring freelance programmers. If you want to do it yourself, read about Ajax, SQL databases, and how PHP accesses them. |