Was hoping i could get a little help, i am trying to create a sign-up page, that a user can enter a username and password in a textbox and then they can select the type of account they wish to use (customer, business, business employee) from a input type of select. And it will redirect them to the sign up.
eg: user comes to index.php, enters a username and password in my sign-up section, then selects and account type (lets say customer), they click the "sign-up" button and then it will redirect to customer_signup.php where username, password and account type are pre-filled (from the index.php page)
However i am having issues posting what the user has entered, below is my code:
<html>
<head>
<title>Home</title>
<script language="JavaScript">
{
function WinOpen()
var url=document.redirect.selection.value
document.location.href=url
}
</script>
</head>
<body>
<form name="redirect">
Username: <input type ="textbox" id ="home_username" name = "home_username">
password: <input type ="textbox" id ="home_password" name = "home_password">
<select name="selection">
<option> </option>
<option value="../php_includes/sign_up/customer_signup.php">Customer</option>
<option value="../php_includes/sign_up/business_signup.php">Business</option>
<option value="../php_includes/sign_up/employee_signup.php">Business Employee</option>
<input type=button value="Sign-Up" onClick="WinOpen();">
</form>
</body>
</html>
I want to be able to post home_username, home_password & selection to the next page which will depend on what the user selected. I want to have a button or submit button as i dont want to use the onchange option.
As of right now the code i have does go to the page when selected, however i cant get the text they entered to POST to the next page. I know i have no post as method. and my input type is a button right now (iv been playing around with my code).
was hoping someone might point me in the right direction, am i going about this the wrong way ? should i use button or submit ? iv got javascript to change the page on the select option can i get it to post username and password data?