|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
My code is fine, maybe my server is screwed up?
I recently began playing with PHP and MySQL. I was running through one of the basic tutorials on this site, and actually managed to get past the first page without screwing something up. But, of course, the second page introduced some problems.
The code block on this page: http://codewalkers.com/tutorials.php?show=5 Works perfectly. I get the form to come up, and no errors are reported. However, the first code block on this page: http://codewalkers.com/tutorials.php?show=5&page=2 Gives a "Notice: Undefined index: submit in c:apachehtdocsphpnews1.php on line 15" message at the bottom of the page. Here's all of the code in my news1.php file: php Code:
I am covinced this is a problem with my PHP installation, as several other tutorials on the 'net have failed to work properly as well. The PHP message boards I have installed localy, PHPBB and VBulletin, work just fine. I am running Apache webserver 1.3.22 for Win32 under Windows 2000 Professional Service Pack 2, along with -Active PERL 5.6.1.633 for Win32 -MySQL 3.23.51 -PHP 4.2.2 for Win32 No firewall, I'm on dial-suck. Would an Apache upgrade fix the problem? Thanks in advance. |
|
#2
|
|||
|
|||
|
RE: My code is fine, maybe my server is screwed up?
The "problem" is that all error reporting is on on your server. That isn't a bad thing really. I let's you know when code isn't coded as well as it should be. That tutorial needs to be updated because of my sloppy coding
if($HTTP_POST_VARS['submit']) { to: if(isset($HTTP_POST_VARS['submit'])) { and place : global $HTTP_POST_VARS; just before that line and things should be better.... |
|
#3
|
|||
|
|||
|
RE: My code is fine, maybe my server is screwed up?
Wow, thanks. I set my php.ini file to only report fatal errors (the kind that are made out to be the end of the world), so things should go smoothly now...
|
|
#4
|
|||
|
|||
|
RE: My code is fine, maybe my server is screwed up?
For old c/c++ coders, the way you did it would be the way to go, but as I found out in the recent programming contest, it isn't the "corect" way of doing it
Even so, I'm not going to quit doing it the old way, just for the contests I am;) ps: I'm stuborn -Sager |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > My code is fine, maybe my server is screwed up? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|