Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PHP/HTML Help

  • 29-12-2009 11:34pm
    #1
    Closed Accounts Posts: 112 ✭✭


    Hi,
    I'm Aran from Gahim, we are a free website builder under construction for the BT Young Scientist, unfortunatly we have come a accross an error which we just can't get our head around, when you visit http://beta.gahim.com there is a form there, that form is suppost to 'throw' that information to http://beta.gahim.com/start. When someone enters there email and password and clicks continue we use the <? echo $_POST; ?> in the value of the email field so what they have entered in the previous form goes onto this. Unfortunatly it just doesn't work, we have tried everything the ID is perfect, the pages are in php and we have even contacted our web host about it and they can't find the problem, could someone please help us? Thanks!


«1

Comments

  • Closed Accounts Posts: 1,200 ✭✭✭louie


    first try to print the POST array
    [php]
    print_r($_POST);
    [/php]

    to make sure your page is receiving the posted data.
    second, change the form enctype='text/plain' to enctype="multipart/form-data"


  • Closed Accounts Posts: 112 ✭✭gahim


    Hi, thanks for your reply I have done everything you have said and have got help from a couple of people but it still doesn't work.
    :confused:


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    You probably have a redirect somwhere

    try this and note the comments
    [php]
    <?php
    /*
    ADD THE PHP CODE AT THE VERY TOP OF THE PAGE

    SET THE FORM TO SUBMIT TO ITSELF - http://beta.gahim.com/ - NOTE THE BETA IN THE URL AS A SUBDOMAIN

    GET THE POST, SET SESSION, AND REDIRECT TO THE LOGIN PAGE
    */
    if(count($_POST)>0){
    $username = $_POST;
    $passwordlogin = $_POST;
    //SET SESSIONS AND REDIRECT
    $_SESSION = $username;
    $_SESSION = $passwordlogin;
    //NOW REDIRECT
    header("Location: YOUR URL HERE TO REDIRECT TO", true, 301);
    exit();
    //ON THE OTHER PAGE LOOK FOR SESSION INSTEAD OF POST
    //ALSO MAKE SURE SESSIONS CAN BE RED ON THE ENTIRE DOMAIN
    }
    ?>
    <form name="Login" method="POST" action="http://beta.gahim.com/&quot; enctype="text/plain" id="Form3">
    <input type="password" id="Editbox3" style="position:absolute;left:276px;top:10px;width:156px;font-family:Arial;font-size:9.3px;z-index:4" size="39" name="passwordlogin" value="">
    <input type="text" id="Editbox4" style="position:absolute;left:65px;top:11px;width:148px;font-family:Arial;font-size:9.3px;z-index:5" size="37" name="username" value="">
    <div id="bv_Text4" style="position:absolute;left:15px;top:14px;width:51px;height:12px;z-index:6" align="left">
    <font style="font-size:9.3px" color="#000000" face="Arial">Username:</font></div>
    <div id="bv_Text3" style="position:absolute;left:231px;top:14px;width:51px;height:12px;z-index:7" align="left">
    <font style="font-size:9.3px" color="#000000" face="Arial">Password:</font></div>
    <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:441px;top:7px;width:45px;height:24px;z-index:8">

    </form>
    [/php]


  • Closed Accounts Posts: 112 ✭✭gahim


    Hi,
    Thanks for your reply

    there are two forms on the page, one is the login form (not done yet) and the other one is the signup form where it throws information to the next page, the code you gave me was for the login form but I don't need anything for the login form.

    Thanks, please send me the code for the signup form, thanks...


  • Closed Accounts Posts: 112 ✭✭gahim


    Hi

    so

    <?php
    /*
    */
    if(count($_POST)>0){
    $email = $_POST;
    $password = $_POST;
    //SET SESSIONS AND REDIRECT
    $_SESSION = $email;
    $_SESSION = $password;
    //NOW REDIRECT
    header("Location:http://beta.gahim.com/start", true, 301);
    exit();
    }
    ?>

    I should put on beta.gahim.com on the top of the page (above title tags etc..) and set the signup form to itself, correct?


  • Advertisement
  • Closed Accounts Posts: 112 ✭✭gahim


    gahim wrote: »
    Hi

    so

    <?php
    /*
    */
    if(count($_POST)>0){
    $email = $_POST;
    $password = $_POST;
    //SET SESSIONS AND REDIRECT
    $_SESSION = $email;
    $_SESSION = $password;
    //NOW REDIRECT
    header("Location:http://beta.gahim.com/start", true, 301);
    exit();
    }
    ?>

    I should put on beta.gahim.com on the top of the page (above title tags etc..) and set the signup form to itself, correct?

    So I have done that, when I click continue it does nothing but refresh the page and clear the fields...
    :confused:


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    What I gave you is for the second form with the "CONTINUE" button.
    You have changed the fields names in the $_POST code to look for the fields from the first form. WHY?

    I don't know if you can understand what's going on as the form action is not set to post data to itself but another page so how do you expect to get the posted fields?


  • Closed Accounts Posts: 112 ✭✭gahim


    Ok sorry, so I will paste the EXACT code you sent me on the top page, the page that recieves the data is beta.gahim.com/start or gahim.com/beta/start...


  • Closed Accounts Posts: 112 ✭✭gahim


    Still doesn't work


  • Closed Accounts Posts: 112 ✭✭gahim


    You see, the code you sent me was to do with the login form as I can see, because everything refers to the login, the signup form with the continue button is different...


  • Advertisement
  • Closed Accounts Posts: 270 ✭✭CoNfOuNd


    I think you are really over-complicating things and you need to just cut it back to the basic code. Something is interfering with your basic PHP $_POST.

    Create a file called test1.php with:
    [PHP]<form name="test" method="POST" action="test2.php">
    <input type="text" size="20" name="email">
    <input type="submit" name="submit" value="submit">
    </form>
    [/PHP]

    and another file test2.php with:
    [PHP]<? echo $_POST; ?>[/PHP]

    The code is really that simple, and it works!

    Then add the other code to the test pages and you'll figure out where you've gone wrong. Trial and error. It could be the Javascript.


  • Closed Accounts Posts: 112 ✭✭gahim


    Hi,
    I know it works but for some reason it doesn't work on this form...

    There is something wrong, can I pay somebody to fix it?


  • Closed Accounts Posts: 270 ✭✭CoNfOuNd


    Cut it down to the bare essential code and then build it up. It's the best way..

    You'll have the satisfaction of knowing you fixed it yourself!


  • Closed Accounts Posts: 112 ✭✭gahim


    On the homepage the form code is
    <form name="Start" method="POST" action="http://beta.gahim.com/start"&gt;
    <input type="text" id="email" style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" id="password" style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png" style="position:absolute;left:125px;top:85px;width:223px;height:59px;z-index:3">
    </form>

    And on the second page
    <form name="signup" method="POST" action="http://beta.gahim.com/signup&quot; enctype="multipart/form-data" id="Form1" onsubmit="return Validatesignup(this)">
    <input type="text" id="Editbox1" style="position:absolute;left:6px;top:155px;width:222px;font-family:Arial;font-size:13px;z-index:0" size="37" name="title" value="">
    <input type="text" style="position:absolute;left:6px;top:123px;width:222px;font-family:Arial;font-size:13px;z-index:1" size="37" name="site" value="">
    <input type="password" style="position:absolute;left:6px;top:93px;width:222px;font-family:Arial;font-size:13px;z-index:2" size="37" name="password" value="<? echo $_POST; ?>">
    <input type="text" style="position:absolute;left:6px;top:62px;width:222px;font-family:Arial;font-size:13px;z-index:3" size="37" name="email" value="<? echo $_POST; ?>">
    <input type="text" style="position:absolute;left:6px;top:31px;width:222px;font-family:Arial;font-size:13px;z-index:4" size="37" name="name" value="">
    <input type="password" style="position:absolute;left:353px;top:92px;width:222px;font-family:Arial;font-size:13px;z-index:5" size="37" name="passwordconfirm" value="">
    <div id="bv_Text5" style="position:absolute;left:237px;top:96px;width:121px;height:16px;z-index:6" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">Confirm Password:</font></div>
    <div id="bv_Text6" style="position:absolute;left:231px;top:130px;width:121px;height:16px;z-index:7" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">.gahim.com</font></div>
    <div id="bv_Text7" style="position:absolute;left:317px;top:131px;width:302px;height:15px;z-index:8" align="left">
    <font style="font-size:12px" color="#282828" face="Arial">Hint: This is what people type in to go to your website</font></div>
    <input type="checkbox" id="Checkbox1"" name="agree" value="" checked style="position:absolute;left:6px;top:188px;z-index:9">
    <div id="bv_Text8" style="position:absolute;left:24px;top:189px;width:190px;height:16px;z-index:10" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">I agree to the <a href="http://www.gahim.com/terms">Terms of Service</a></font></div>
    <input type="submit" id="Button1"" name="Submit" value="Ok, Create My Website" style="position:absolute;left:11px;top:220px;width:190px;height:24px;z-index:11">

    </form>


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    Did you check your LOG FILES?
    I have a feeling there is some sort of redirection there which makes you loose the POST data.


  • Closed Accounts Posts: 112 ✭✭gahim


    I am completely lost, everything in the code I need


  • Closed Accounts Posts: 112 ✭✭gahim


    louie wrote: »
    Did you check your LOG FILES?
    I have a feeling there is some sort of redirection there which makes you loose the POST data.

    I don't think I have any log files, where do I find them?


  • Registered Users, Registered Users 2 Posts: 339 ✭✭spoonface


    I took your form and changed its action to point to my server and changed it to GET so I could see your vars in the access log. Here's what I got:

    GET /start?Submit.x=0&Submit.y=0

    The same occurred using POST. So the error is at the most basic level (in your html, not in your receiving PHP) i.e. the actual form doesn't correctly submit its variables. Maybe you should build your form up from scratch to be sure of what's going on.

    Also, add this to your PHP code (even with nothing else in your page initially to see what's coming in - it will be displayed onscrceen.

    $form_fields = array_keys($HTTP_POST_VARS);
    print "######################################################################<p>POST:<br><br>\n";
    for ($i = 0; $i < sizeof($form_fields); $i++) {

    $thisField = $form_fields[$i];
    $thisValue = $HTTP_POST_VARS[$thisField];
    print "<br>$thisField = $thisValue<br>\n";
    };

    print "<p>GET:<br><br>\n";
    $form_fields2 = array_keys($HTTP_GET_VARS);
    for ($i = 0; $i < sizeof($form_fields2); $i++) {

    $thisField = $form_fields2[$i];
    $thisValue = $HTTP_GET_VARS[$thisField];
    print "<br>$thisField = $thisValue<br>\n";
    };
    print "<p>######################################################################<p>\n";



    Hope this helps.


  • Closed Accounts Posts: 112 ✭✭gahim


    Hi Thanks for your reply unfortunatly I have no idea where to put that php code since I am very new to creating websites in addition I built this form on a web builder and checked the whole code and everything is perfect, I contacted someone from SpiralHost and they agreed everything seems good... I can't create it from scratch as I need certain exact positions which I cannot code myself...

    :confused:

    Thanks for all your help and I'm sure we can get to the bottom of this...


  • Closed Accounts Posts: 1,200 ✭✭✭louie


    A form has to be posted directly to the receving page otherwise you loose all the posted data. Also try using a basic submit button not an image as you need to rule everything out before starting from scratch...


  • Advertisement
  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    The address http://beta.gahim.com/signup is broken

    The page http://beta.gahim.com/start seems to be another form; while it's possible that the PHP defaults to displaying the form if it receives no $_POST variables, I somehow doubt it....

    Have you tried the bare form code ?
    And which browsers have you tested it on ?


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    P.S. Are you developing the "free website builder" too ?

    If so, lose the "position:absolute" asap, and also bear in mind that "drag and drop as per Microsoft Word" is not desirable on the web since most people without the required knowledge will create layouts that work on their screen, browser, and resolution only and this will result in crap-looking, unusable websites; I already have to scroll horizontally on a Netbook to see your form and navigation, and that's a complete no-no.


  • Registered Users, Registered Users 2 Posts: 339 ✭✭spoonface


    gahim wrote: »
    Hi Thanks for your reply unfortunatly I have no idea where to put that php code since I am very new to creating websites in addition I built this form on a web builder and checked the whole code and everything is perfect, I contacted someone from SpiralHost and they agreed everything seems good... I can't create it from scratch as I need certain exact positions which I cannot code myself...

    :confused:

    Thanks for all your help and I'm sure we can get to the bottom of this...

    From what you've said, it sounds like you're trying to use PHP but without knowing anything about it. I suggest reading at least some of Programming PHP in the O'Reilly Series to get started. Otherwise even if we manage to solve this issue for you, you won't get past the next stumbling block without knowledge of how to program PHP.

    Also, your initial description isn't very clear, which makes it hard for us to suggest solutions. Maybe try rewording it / thinking through what you've got going on.


  • Closed Accounts Posts: 112 ✭✭gahim


    Hi,
    As a somebody has said, I am trying to use PHP and have done everything perfectly, I have tried all 3 web browsers and someone from my hosting company even took a look at it and yes it's a free website builder for the BT Young Scientist Exhibition in the RDS in January 12th.


  • Closed Accounts Posts: 112 ✭✭gahim


    Liam Byrne wrote: »
    The address http://beta.gahim.com/signup is broken

    The page http://beta.gahim.com/start seems to be another form; while it's possible that the PHP defaults to displaying the form if it receives no $_POST variables, I somehow doubt it....

    Have you tried the bare form code ?
    And which browsers have you tested it on ?

    beta.gahim.com/start and gahim.com/beta/start are the same page as thats how subdomains work on this host, here is no gahim.com/signup


  • Closed Accounts Posts: 112 ✭✭gahim


    The form is going straight to the page.

    No fields should be lost, could someone take a look, and people are sending me PHP codes but I don't know where to put them, I am knew to PHP and don't have much time left to get this done...

    I would appreciate if someone could provide me step-by-step instructions...

    BT Young Scientist - 12th January - Gahim


  • Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭Gordon


    gahim wrote: »
    On the homepage the form code is
    <form name="Start" method="POST" action="http://beta.gahim.com/start"&gt;
    <input type="text" id="email" style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" id="password" style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png" style="position:absolute;left:125px;top:85px;width:223px;height:59px;z-index:3">
    </form>

    And on the second page
    <form name="signup" method="POST" action="http://beta.gahim.com/signup&quot; enctype="multipart/form-data" id="Form1" onsubmit="return Validatesignup(this)">
    <input type="text" id="Editbox1" style="position:absolute;left:6px;top:155px;width:222px;font-family:Arial;font-size:13px;z-index:0" size="37" name="title" value="">
    <input type="text" style="position:absolute;left:6px;top:123px;width:222px;font-family:Arial;font-size:13px;z-index:1" size="37" name="site" value="">
    <input type="password" style="position:absolute;left:6px;top:93px;width:222px;font-family:Arial;font-size:13px;z-index:2" size="37" name="password" value="<? echo $_POST; ?>">
    <input type="text" style="position:absolute;left:6px;top:62px;width:222px;font-family:Arial;font-size:13px;z-index:3" size="37" name="email" value="<? echo $_POST; ?>">
    <input type="text" style="position:absolute;left:6px;top:31px;width:222px;font-family:Arial;font-size:13px;z-index:4" size="37" name="name" value="">
    <input type="password" style="position:absolute;left:353px;top:92px;width:222px;font-family:Arial;font-size:13px;z-index:5" size="37" name="passwordconfirm" value="">
    <div id="bv_Text5" style="position:absolute;left:237px;top:96px;width:121px;height:16px;z-index:6" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">Confirm Password:</font></div>
    <div id="bv_Text6" style="position:absolute;left:231px;top:130px;width:121px;height:16px;z-index:7" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">.gahim.com</font></div>
    <div id="bv_Text7" style="position:absolute;left:317px;top:131px;width:302px;height:15px;z-index:8" align="left">
    <font style="font-size:12px" color="#282828" face="Arial">Hint: This is what people type in to go to your website</font></div>
    <input type="checkbox" id="Checkbox1"" name="agree" value="" checked style="position:absolute;left:6px;top:188px;z-index:9">
    <div id="bv_Text8" style="position:absolute;left:24px;top:189px;width:190px;height:16px;z-index:10" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">I agree to the <a href="http://www.gahim.com/terms">Terms of Service</a></font></div>
    <input type="submit" id="Button1"" name="Submit" value="Ok, Create My Website" style="position:absolute;left:11px;top:220px;width:190px;height:24px;z-index:11">

    </form>
    Unless I'm wrong, shouldn't
    <input type="text" id="email" style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" id="password" style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    
    be
    <input type="text" id="email" [b]name="email"[/b] style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" id="password" [b]name="password"[/b] style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    

    ?

    Also, am I right in thinking that this is a website to showcase your young scientist and technology skills? I don't mean to sound rude, and sorry if it comes across rudely, but you might want to think about getting a coder onboard that will be able to upskill you on the technology aspect if you want this project to work. Building a free website builder site can't be an easy thing, you need a coder to make this work in my opinion.


  • Closed Accounts Posts: 112 ✭✭gahim


    I have finnished the builder, I am good at code and I have done everything right in this code


  • Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭Gordon


    Cool, so it's working then?


  • Advertisement
  • Closed Accounts Posts: 112 ✭✭gahim


    Loads of people agree that there shouldn't be anything wrong and it's a simple PHP post code and should work, even on this form people can't find the problem...

    :confused:


  • Closed Accounts Posts: 112 ✭✭gahim


    Post form isn't working but the builder is...


  • Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭Gordon


    Can you post the PHP code to this page -> http://beta.gahim.com/start/

    I think you have mixed up the name bits as on the first page you have name="passwordlogin" as opposed to "password".


  • Closed Accounts Posts: 112 ✭✭gahim


    Gordon wrote: »
    Can you post the PHP code to this page -> http://beta.gahim.com/start/

    I think you have mixed up the name bits as on the first page you have name="passwordlogin" as opposed to "password".

    Thats a different form, there are two forms on the page...

    Login which consists of passwordlogin and the signup form which is the one which is posting the data to start.gahim.com/start, there is also a login form on the /start page...


  • Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭Gordon


    Sorry, missed the fact that it was a login form.

    What's the PHP code to the second page?


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    Which login isn't working ?

    On the top right (header) of the home page, the fields are called
    <form name="Start" method="POST" action="http://beta.gahim.com/start">
    <input type="text" ..... name="email" ..... " value="">
    <input type="password" ..... name="password" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png">
    </form>
    

    In the main form of the home page, the fields are as follows:
    <form name="Login" method="POST" action="http://www.gahim.com/login">
    <input type="password" ..... name="passwordlogin" value="">
    <input type="text" ..... name="username" value="">
    <input type="submit" ..... name="Login" value="Login">
    </form>
    

    Are either of them working ?

    The header form takes you to a non-existing page when it's submitted.

    And if both are meant to be the same, why are the $_POST variables being passed different ?

    And as it is, the main "login" form just sends you to another form.


  • Advertisement
  • Closed Accounts Posts: 112 ✭✭gahim


    Liam Byrne wrote: »
    Which login isn't working ?

    On the top right (header) of the home page, the fields are called
    <form name="Start" method="POST" action="http://beta.gahim.com/start">
    <input type="text" ..... name="email" ..... " value="">
    <input type="password" ..... name="password" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png">
    </form>
    
    In the main form of the home page, the fields are as follows:
    <form name="Login" method="POST" action="http://www.gahim.com/login">
    <input type="password" ..... name="passwordlogin" value="">
    <input type="text" ..... name="username" value="">
    <input type="submit" ..... name="Login" value="Login">
    </form>
    
    Are either of them working ?

    The header form takes you to a non-existing page when it's submitted.

    And if both are meant to be the same, why are the $_POST variables being passed different ?

    And as it is, the main "login" form just sends you to another form.

    Forget about the login form, its the signup form


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    gahim wrote: »
    Forget about the login form, its the signup form

    Apart from the fact that it's not obvious that it's a signup form, what is the signup form meant to do ?

    At the moment it brings you to another signup form, where you apparently need to input your email address, etc, a second time.

    What is the PHP code for that target page, and what is it meant to do instead of displaying a form ?


  • Closed Accounts Posts: 112 ✭✭gahim


    It is suppost to do a post or 'throw' the information onto the next form like webs.com, enter your email and password and when you go onto the next form you will see....


  • Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭Gordon


    It's a shame you're not posting up the relevant php text for the second page as you've been asked a number of times now. Oh well, good luck with it.


  • Closed Accounts Posts: 112 ✭✭gahim


    Gordon wrote: »
    It's a shame you're not posting up the relevant php text for the second page as you've been asked a number of times now. Oh well, good luck with it.

    3 times people have sent me php codes to put on a page but which page and where, I have asked but people have ignored the message...


  • Advertisement
  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    gahim wrote: »
    It is suppost to do a post or 'throw' the information onto the next form like webs.com, enter your email and password and when you go onto the next form you will see....

    OK, I think I've FINALLY gotten my head around what you're trying to do!
    <form name="signup" method="POST" action="http://beta.gahim.com/signup" enctype="multipart/form-data" id="Form1" onsubmit="return Validatesignup(this)">
    <input type="text" id="Editbox1" style="position:absolute;left:6px;top:155px;width:222px;font-family:Arial;font-size:13px;z-index:0" size="37" name="title" value="">
    <input type="text" style="position:absolute;left:6px;top:123px;width:222px;font-family:Arial;font-size:13px;z-index:1" size="37" name="site" value="">
    <input type="password" style="position:absolute;left:6px;top:93px;width:222px;font-family:Arial;font-size:13px;z-index:2" size="37" name="password" value="[b]<? echo $_POST['password']; ?>[/b]">
    <input type="text" style="position:absolute;left:6px;top:62px;width:222px;font-family:Arial;font-size:13px;z-index:3" size="37" name="email" value="[b]<? echo $_POST['email']; ?>[/b]">
    <input type="text" style="position:absolute;left:6px;top:31px;width:222px;font-family:Arial;font-size:13px;z-index:4" size="37" name="name" value="">
    <input type="password" style="position:absolute;left:353px;top:92px;width:222px;font-family:Arial;font-size:13px;z-index:5" size="37" name="passwordconfirm" value="">
    <div id="bv_Text5" style="position:absolute;left:237px;top:96px;width:121px;height:16px;z-index:6" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">Confirm Password:</font></div>
    <div id="bv_Text6" style="position:absolute;left:231px;top:130px;width:121px;height:16px;z-index:7" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">.gahim.com</font></div>
    <div id="bv_Text7" style="position:absolute;left:317px;top:131px;width:302px;height:15px;z-index:8" align="left">
    <font style="font-size:12px" color="#282828" face="Arial">Hint: This is what people type in to go to your website</font></div>
    <input type="checkbox" id="Checkbox1"" name="agree" value="" checked style="position:absolute;left:6px;top:188px;z-index:9">
    <div id="bv_Text8" style="position:absolute;left:24px;top:189px;width:190px;height:16px;z-index:10" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">I agree to the <a href="http://www.gahim.com/terms">Terms of Service</a></font></div>
    <input type="submit" id="Button1"" name="Submit" value="Ok, Create My Website" style="position:absolute;left:11px;top:220px;width:190px;height:24px;z-index:11">
    
    </form>
    

    From the code above, the second form is supposed to take the values entered in the first form.

    The problem is that the first form doesn't have those $_POST variables (email and password) to send to the second form.

    The elements in the forms have ID attributes, but they do not have the NAME attribute that is required to send form details. An ID does not equate to a name.
    <form name="Start" method="POST" action="http://beta.gahim.com/start">
    <input type="text" [b]id="email"[/b] style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" [b]id="password"[/b] style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png" style="position:absolute;left:125px;top:85px;width:223px;height:59px;z-index:3">
    </form>
    

    I actually think that this was said a few pages back - by Gordon, and thanked by me - and you seemed to ignore it.

    The proper code for the first form should be
    <form name="Start" method="POST" action="http://beta.gahim.com/start">
    <input type="text" [b]name="email" id="email"[/b] style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" [b]name="password" id="password"[/b] style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png" style="position:absolute;left:125px;top:85px;width:223px;height:59px;z-index:3">
    </form>
    

    The above - if done - WILL work. If you actually take heed of it this time.

    And read up about how forms actually work :

    http://www.learn-html-tutorial.com/Forms.cfm
    Id and Name Attributes
    Form fields (also called controls) take both the name attribute and the id attribute. They are used for different purposes.

    The name attribute is used to hold the value of the field. It is passed to the server as a variable.
    The id attribute is used by CSS and JavaScript to identify a specific element.


  • Closed Accounts Posts: 112 ✭✭gahim


    Liam Byrne wrote: »
    OK, I think I've FINALLY gotten my head around what you're trying to do!
    <form name="signup" method="POST" action="http://beta.gahim.com/signup" enctype="multipart/form-data" id="Form1" onsubmit="return Validatesignup(this)">
    <input type="text" id="Editbox1" style="position:absolute;left:6px;top:155px;width:222px;font-family:Arial;font-size:13px;z-index:0" size="37" name="title" value="">
    <input type="text" style="position:absolute;left:6px;top:123px;width:222px;font-family:Arial;font-size:13px;z-index:1" size="37" name="site" value="">
    <input type="password" style="position:absolute;left:6px;top:93px;width:222px;font-family:Arial;font-size:13px;z-index:2" size="37" name="password" value="[B]<? echo $_POST['password']; ?>[/B]">
    <input type="text" style="position:absolute;left:6px;top:62px;width:222px;font-family:Arial;font-size:13px;z-index:3" size="37" name="email" value="[B]<? echo $_POST['email']; ?>[/B]">
    <input type="text" style="position:absolute;left:6px;top:31px;width:222px;font-family:Arial;font-size:13px;z-index:4" size="37" name="name" value="">
    <input type="password" style="position:absolute;left:353px;top:92px;width:222px;font-family:Arial;font-size:13px;z-index:5" size="37" name="passwordconfirm" value="">
    <div id="bv_Text5" style="position:absolute;left:237px;top:96px;width:121px;height:16px;z-index:6" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">Confirm Password:</font></div>
    <div id="bv_Text6" style="position:absolute;left:231px;top:130px;width:121px;height:16px;z-index:7" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">.gahim.com</font></div>
    <div id="bv_Text7" style="position:absolute;left:317px;top:131px;width:302px;height:15px;z-index:8" align="left">
    <font style="font-size:12px" color="#282828" face="Arial">Hint: This is what people type in to go to your website</font></div>
    <input type="checkbox" id="Checkbox1"" name="agree" value="" checked style="position:absolute;left:6px;top:188px;z-index:9">
    <div id="bv_Text8" style="position:absolute;left:24px;top:189px;width:190px;height:16px;z-index:10" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">I agree to the <a href="http://www.gahim.com/terms">Terms of Service</a></font></div>
    <input type="submit" id="Button1"" name="Submit" value="Ok, Create My Website" style="position:absolute;left:11px;top:220px;width:190px;height:24px;z-index:11">
    
    </form>
    
    From the code above, the second form is supposed to take the values entered in the first form.

    The problem is that the first form doesn't have those $_POST variables (email and password) to send to the second form.

    The elements in the forms have ID attributes, but they do not have the NAME attribute that is required to send form details. An ID does not equate to a name.
    <form name="Start" method="POST" action="http://beta.gahim.com/start">
    <input type="text" [B]id="email"[/B] style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" [B]id="password"[/B] style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png" style="position:absolute;left:125px;top:85px;width:223px;height:59px;z-index:3">
    </form>
    
    I actually think that this was said a few pages back - by Gordon, and thanked by me - and you seemed to ignore it.

    The proper code for the first form should be
    <form name="Start" method="POST" action="http://beta.gahim.com/start">
    <input type="text" [B]name="email" id="email"[/B] style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" [B]name="password" id="password"[/B] style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png" style="position:absolute;left:125px;top:85px;width:223px;height:59px;z-index:3">
    </form>
    
    The above - if done - WILL work. If you actually take heed of it this time.

    And read up about how forms actually work :

    http://www.learn-html-tutorial.com/Forms.cfm


    Thanks for your response, I deleted my form code and pasted your form code in and nothing has changed... I have been told to put a PHP code onto the start page but I don't know where, the other time people are getting mixed up with the login form which is at the top right of the page.

    Thanks for everyones help


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    At the VERY TOP of the "second page" (the full signup form) put in the following code:
    <?php
    foreach ($_POST as $k=>$v) {
     echo $k." : ".$v."<br>";
    }
    ?>
    

    See if the form is sending the content to that page.


  • Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭Gordon


    gahim wrote: »
    On the homepage the form code is
    <form name="Start" method="POST" action="http://beta.gahim.com/start"&gt;
    <input type="text" id="email" style="position:absolute;left:124px;top:13px;width:224px;font-family:Arial;font-size:16px;z-index:1" size="32" value="">
    <input type="password" id="password" style="position:absolute;left:124px;top:50px;width:224px;font-family:Arial;font-size:16px;z-index:2" size="32" value="">
    <input type="image" id="Submit" name="Submit" src="continuehome.png" style="position:absolute;left:125px;top:85px;width:223px;height:59px;z-index:3">
    </form>

    And on the second page
    <form name="signup" method="POST" action="http://beta.gahim.com/signup&quot; enctype="multipart/form-data" id="Form1" onsubmit="return Validatesignup(this)">
    <input type="text" id="Editbox1" style="position:absolute;left:6px;top:155px;width:222px;font-family:Arial;font-size:13px;z-index:0" size="37" name="title" value="">
    <input type="text" style="position:absolute;left:6px;top:123px;width:222px;font-family:Arial;font-size:13px;z-index:1" size="37" name="site" value="">
    <input type="password" style="position:absolute;left:6px;top:93px;width:222px;font-family:Arial;font-size:13px;z-index:2" size="37" name="password" value="<? echo $_POST; ?>">
    <input type="text" style="position:absolute;left:6px;top:62px;width:222px;font-family:Arial;font-size:13px;z-index:3" size="37" name="email" value="<? echo $_POST; ?>">
    <input type="text" style="position:absolute;left:6px;top:31px;width:222px;font-family:Arial;font-size:13px;z-index:4" size="37" name="name" value="">
    <input type="password" style="position:absolute;left:353px;top:92px;width:222px;font-family:Arial;font-size:13px;z-index:5" size="37" name="passwordconfirm" value="">
    <div id="bv_Text5" style="position:absolute;left:237px;top:96px;width:121px;height:16px;z-index:6" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">Confirm Password:</font></div>
    <div id="bv_Text6" style="position:absolute;left:231px;top:130px;width:121px;height:16px;z-index:7" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">.gahim.com</font></div>
    <div id="bv_Text7" style="position:absolute;left:317px;top:131px;width:302px;height:15px;z-index:8" align="left">
    <font style="font-size:12px" color="#282828" face="Arial">Hint: This is what people type in to go to your website</font></div>
    <input type="checkbox" id="Checkbox1"" name="agree" value="" checked style="position:absolute;left:6px;top:188px;z-index:9">
    <div id="bv_Text8" style="position:absolute;left:24px;top:189px;width:190px;height:16px;z-index:10" align="left">
    <font style="font-size:13px" color="#000000" face="Arial">I agree to the <a href="http://www.gahim.com/terms">Terms of Service</a></font></div>
    <input type="submit" id="Button1"" name="Submit" value="Ok, Create My Website" style="position:absolute;left:11px;top:220px;width:190px;height:24px;z-index:11">

    </form>
    This does not correspond with what is live, on your site at the moment. What is on your site now? Including the php code as you have posted above.


  • Closed Accounts Posts: 112 ✭✭gahim


    Can you go to beta.gahim.com and try it, my cache now won't clear...


  • Registered Users, Registered Users 2 Posts: 35,524 ✭✭✭✭Gordon


    Still the same for me.


  • Closed Accounts Posts: 112 ✭✭gahim


    I have changed it, doesn't work...


  • Registered Users, Registered Users 2 Posts: 291 ✭✭Popple3


    I think you'll need to post the PHP code from http://beta.gahim.com/start/ in order for anyone to help.


  • Closed Accounts Posts: 112 ✭✭gahim


    I have done, please clear your cache and refresh the page


  • Registered Users, Registered Users 2 Posts: 291 ✭✭Popple3


    Is <? echo $_POST; ?> and <? echo $_POST; ?> the only PHP code on the start page? Or is there PHP code above it?

    Another could be the server may only recognise the <?php opening tag and not just <?
    Long shot, but worth a go...


  • Advertisement
Advertisement