Jump to content

Coding problem


fourforfore

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.