Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: PHP---form processing--newbie here

  1. #1

    Default PHP---form processing--newbie here

    I am new and a little nervous about asking this, but I am not sure how big my problem is--so here goes:
    I want to put a form on my site that when folks click "Submit" it will send me the data. Here is what I have done:
    I downloaded the PHPFORM program for the free 7 day trial. I created the form.
    Here are my questions:
    1-Can I edit this form without going to the html code in its raw form? (I am not a programmer---I can fix simple stuff, but this is a bit overwhelming)
    2-How do I fix this error message that shows up when I click "submit":

    Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/academya/public_html/PHPFORM/use/OnlineEnrollment1/process.php on line 70

    It seems like I am close to getting this form ready for use, but because I have never done this before, I don't know if my perception is way off and I need to get an expert, or if I am able to do it myself. All input is VERY appreciated. THANKS!

  2. #2
    Join Date
    Feb 2006
    Posts
    192

    Default

    Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/academya/public_html/PHPFORM/use/OnlineEnrollment1/process.php on line 70
    It is clear that you WILL need to look in the code to fix the syntax error on line 70
    If you don't do programming, then no php program will do you any good. The most seasoned programmer WILL make typos and MUST go to the code.
    So, you either need to learn some programming as you go along or make a form using only html,.... well you still will have to go in the html code if an error occurs, because no WYSYWYG program will be able to tell you what your syntax error is.
    copy past line 70 here. perhaps i can see the error
    Everything in moderation

  3. #3

    Default

    Here is what is listed on the 70th line

    <td bordercolor="#ffffff" width="189" bgcolor="#eff3f7" height="30"><font face="Verdana" size="2">Person Responsible for Payment if different</font></td>

    Thank you for reply. Is there a good book or online resource that you would recommend? (I really am a computer programmer dressed up as a dance teacher!)

  4. #4
    Join Date
    Feb 2006
    Posts
    192

    Default

    oh that is just the html output source code. What you need to post is line 70 of process.php (the php code that generated the page)
    Everything in moderation

  5. #5

    Default

    Sorry---here it is---(I think)


    If Returning Student please enter ID number: ".$IfReturningStudentpleaseenterIDnumber."


    Here are the lines above and below that as well, just in case you need more info:

    if($errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF) ,"/"));
    $message="New or Returning Student: ".$NeworReturningStudent."
    If Returning Student please enter ID number: ".$IfReturningStudentpleaseenterIDnumber."
    Student Name: ".$StudentName."


    Thanks again for your time.

  6. #6
    Join Date
    Feb 2006
    Posts
    192

    Default

    my first impression was "this reeks of syntax errors", but since it was generated by the phpform program, i'm now as confused as you are. I think i have that program, i'll take a look and see. I'll try to get back to you today, or maybe someone else will jump in and help out.
    Everything in moderation

  7. #7
    Join Date
    Feb 2006
    Posts
    192

    Default

    if($errors==1) echo $error;
    else{
    $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF) ,"/"));
    $message="New or Returning Student: ".$NeworReturningStudent."
    If Returning Student please enter ID number: ".$IfReturningStudentpleaseenterIDnumber."
    Student Name: ".$StudentName."
    I don't have phpform, but from what i can see it seems that line 70
    begins with $message="New or .....
    and ends somewhere after Student: ".$NeworReturningStudent."
    so i'd like to see line 71 too.

    I doubt it that the program would generate a syntax error like this:
    line 70:
    $message="New or Returning Student: ".$NeworReturningStudent."

    because if line 70 ends here then that would mean the line needs to end with $NeworReturningStudent;
    and that the following lines also have syntax errors.

    If any this is all confusing, then you should consider using another way to create an online form preferable html instead of php.(with an editor like htmlkit or acehtml)
    hope this helps, but feel free to continue or pm me.
    Everything in moderation

  8. #8

    Default Switching Gears

    I decided to download HTML-Kit and work with a different version of my form that I created in Publisher--I actually like it better as I have more control of the layout. I have called the file up in HTML-Kit and am giving this a shot. I am looking on bluehost now for a "Form Processing Script". I am guessing that I need a "file" (form processing script) that I will place in a line in my form as follows:

    <form action="http://www.example.net/cgi-bin/generic.cgi" method=post>

    where: www.example.net/cgi-big/generic.cgi
    is the form processing script file.

    Is there such a file that I have access to from bluehost? If so, what is it called and where is it?

    NEVER MIND :-) I FOUND IT :-) YEAH!!!!!!
    Thank you again!!!!
    Last edited by tap.queen; 08-11-2006 at 11:57 AM.

  9. #9
    Join Date
    Feb 2006
    Posts
    192

    Smile


    you're welcome.
    Everything in moderation

  10. #10
    Join Date
    Mar 2007
    Posts
    7

    Default

    uhmm...whats - WYSYWYG ????....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •