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

PHP/HTML Help

Options
2

Comments

  • Closed Accounts Posts: 112 ✭✭gahim


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


  • Registered Users Posts: 35,523 ✭✭✭✭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 Posts: 35,523 ✭✭✭✭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 Posts: 35,523 ✭✭✭✭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 Posts: 35,523 ✭✭✭✭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 Posts: 35,523 ✭✭✭✭Gordon


    Still the same for me.


  • Closed Accounts Posts: 112 ✭✭gahim


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


  • Registered Users 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 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
  • Closed Accounts Posts: 112 ✭✭gahim


    Well I have updated the site but something is wrong with spiralhosting and its taking a while to update, I have tried clearing cache and refreshing and the code editor shows the updated codes.


  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    You should open a support message with your hosting company. They may have a problem in their end and should help you solve your problem.


  • Closed Accounts Posts: 112 ✭✭gahim


    HandWS LTD wrote: »
    You should open a support message with your hosting company. They may have a problem in their end and should help you solve your problem.

    Someone from my hosting company has subscribed to this form so hopefully the message will go out :)


  • Closed Accounts Posts: 270 ✭✭CoNfOuNd


    Sorry. I'm only just checking back on this now.

    I just wanted to clarify that there is/was no problem with our servers! $_POST is obviously used on many sites on our servers, and the test code I provided earlier (post 12 on this thread) works fine on this account. The problem is with the coding.


  • Closed Accounts Posts: 112 ✭✭gahim


    I am having someone look at it with me


  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    Have you tried debugging your php script to find the exact error within your code? This can help in many cases if you are lost and if it is a php error or not.

    However, after trying to register, it now seems like "/start/register.php" file is not in the correct location on your server. Upload this before you continue.

    If you can post all the code associated with what you have now in the login section then we can have a clearer idea on how to help you. This includes your <?php ... ?> code.


  • Closed Accounts Posts: 112 ✭✭gahim


    Current pages I have is

    beta.gahim.com/log.php
    beta.gahim.com/login.php
    beta.gahim.com - (Has a login code on it)
    beta.gahim.com/start - Signup Form
    beta.gahim.com/start/register.php - Blank page wondering what to put on it

    :confused::confused::confused::confused:


  • Closed Accounts Posts: 112 ✭✭gahim


    Hi,
    I have created the registration form fields do you know how to continue?


  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    gahim wrote: »
    Current pages I have is

    beta.gahim.com/log.php
    beta.gahim.com/login.php
    beta.gahim.com - (Has a login code on it)
    beta.gahim.com/start - Signup Form
    beta.gahim.com/start/register.php - Blank page wondering what to put on it

    :confused::confused::confused::confused:

    beta.gahim.com/log.php redirects to beta.gahim.com/login.php so its the same page.

    As your users are registering via the beta.gahim.com/start page there is no need for beta.gahim.com/start/register.php. Unless you want to collect more information from your users.

    Where are you posting these information to? Are you using a database? In my opinion, what you are trying to do is POST all the information via your php code to beta.gahim.com/start/register.php file and then add this to the database (this is if you are not collecting more information from your users). You need to use the $_POST code inside your beta.gahim.com/start/register.php file to collect that information. This is the right way to do it. So, you will need to work on your beta.gahim.com/start/register.php file to collect the required information and store it in your database.

    Just checked your website.....is the code in your register.php closed:
    <?xml version="1.0" encoding="UTF-8"
    should be:
    <?xml version="1.0" encoding="UTF-8" ?>


  • Advertisement
  • Closed Accounts Posts: 112 ✭✭gahim


    Hi,
    I have attached how to signup form works (or how it's suppost to work :))


Advertisement