fourforfore Posted March 28, 2012 Share Posted March 28, 2012 The first thing I want to point out is that I am completely php illiterate. Now that we have that out of the way, here's my scenario. I built a web form using a program called PC Object Generator from their online site. Everything went fine. I uploaded all the files and ran the setup (as instructed). Here's where the problem comes in. When I go to www.b-binc.com/corb/setup it takes me to the POG setup. I then click on the 'pog me up' button and it tells me to re-check my database. I have emailed the website where I used the program. Very slow on resposne. I assume they too are busy with real php people. That's OK, except that I really need to get this form working. I contacted my IP and they emailed me back and said everything on their end is working and I have the right login data. I believe that the problem is in the configuration file. I have attached the file if anyone has the time to take a look at it and make some suggestions. I hope this makes any sense. Thanks 17904_.php 17905_.php Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/ Share on other sites More sharing options...
creata.physics Posted March 28, 2012 Share Posted March 28, 2012 It isn't exactly showing why you're getting that error which isn't cool. Well it isn't even exactly an error since you don't get any messages. I'd assume it's your db connection information, everything else in the config.php file is fine. Anyway, there's not enough information here for us to find out what's going on. What's the link to this pog so I can go through its source? Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332038 Share on other sites More sharing options...
fourforfore Posted March 28, 2012 Author Share Posted March 28, 2012 Here's the link... http://www.phpobjectgenerator.com/ Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332041 Share on other sites More sharing options...
PFMaBiSmAd Posted March 28, 2012 Share Posted March 28, 2012 The output on your site abruptly stops after it outputs that re-check database image/link. There is probably a fatal runtime error. For debugging purposes, add the following two lines of code immediately after the first opening <?php tag in the index.php file in the setup folder (and hope that the pog code does not turn off the two settings) - ini_set("display_errors", "1"); error_reporting(-1); Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332050 Share on other sites More sharing options...
fourforfore Posted March 28, 2012 Author Share Posted March 28, 2012 OK That gave me a new message... Parse error: syntax error, unexpected T_STRING, expecting '{' in /users1/data/b/b-binc.com-86494/public_html/corb/objects/class.longest drive ages 31-55 .php on line 19 Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332065 Share on other sites More sharing options...
creata.physics Posted March 28, 2012 Share Posted March 28, 2012 Can we have the code referencing that error so we can see where the missing bracket is? Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332101 Share on other sites More sharing options...
fourforfore Posted March 28, 2012 Author Share Posted March 28, 2012 I believe this is it. 17906_.php 17907_.php Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332106 Share on other sites More sharing options...
creata.physics Posted March 28, 2012 Share Posted March 28, 2012 Okay, I don't know why I didn't see this immedaitely. These class names with spaces are not going to work my friend. class longest_drive_ages_18_30 will work, but not class longest drive ages 18-30 with spaces. Pretty much anywhere you have all those spaces needs to be renamed/styled. Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332110 Share on other sites More sharing options...
fourforfore Posted March 28, 2012 Author Share Posted March 28, 2012 OK Looks like I have some work to do. I'm sure that's not the only place for that type of problem. I'll be back when I'm done. Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332118 Share on other sites More sharing options...
fourforfore Posted March 29, 2012 Author Share Posted March 29, 2012 So, I changed the class.longest drive ages 18-30 file I have two other files I knew I would have to change also: class.longest drive ages 31-55 file and the class.longest drive ages 56+ file I changed those. When I checked those, this message came up: Parse error: syntax error, unexpected T_STRING, expecting '{' in /users1/data/b/b-binc.com-86494/public_html/corb/objects/class.longest drive ages 31-55 .php on line 19 The code is exactly the same in all three files except for the ages. The 18-30 seems to be just fine. Any ideas what of what I'm missing? I tried placing the bracket in several different places, but that didn't help. Probably because I have no idea what I'm doing. By the way, I appreciate your help and patience. Thanks 17913_.php 17914_.php 17915_.php Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332141 Share on other sites More sharing options...
PFMaBiSmAd Posted March 29, 2012 Share Posted March 29, 2012 Php labels (class names, function names/class methods, and variables/class properties) may not contain spaces or dashes. Function names follow the same rules as other labels in PHP. A valid function name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332159 Share on other sites More sharing options...
fourforfore Posted March 29, 2012 Author Share Posted March 29, 2012 I thought I understood that before, but evidently not. Here's what line 19 was originally: class Longest Drive ages 31-55 extends POG_Base Here's the two variations that I've tried, of which neither worked. class Longest_Drive_ages_31_55 extends POG_Base class_Longest_Drive_ages_31_55_extends POG_Base I'm know I must be missing something, but what? Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332166 Share on other sites More sharing options...
PFMaBiSmAd Posted March 29, 2012 Share Posted March 29, 2012 I recommend that you re-generate the code using that site, using names that are valid (it's kind of funny that someone would go to the trouble of writing a php code generator but wouldn't validate the input or even mention on the input form what is permitted as a name and what isn't.) Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332168 Share on other sites More sharing options...
fourforfore Posted March 29, 2012 Author Share Posted March 29, 2012 That's a good idea. Will let you know how that turns out. Quote Link to comment https://forums.phpfreaks.com/topic/259887-coding-problem/#findComment-1332172 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.