- This topic is empty.
November 1, 2016 at 11:27 am #247276spitosdevParticipant
Hi, I have made a button that will link to an registration page. This is how I am so far:
input type=”submit” name=”sumbit” value=”Create an account” class=”btn-registrer”
Now I dont know how to link this to “Registrer.html page? I know that I can type <a href etc. but I have a full css to this button, so how do I link it?November 1, 2016 at 11:43 am #247277ShikkedielParticipant
Registrer.htmlthe page you land on after signing up? As I understand, you’d have to redirect the page after the button is pressed, not use the button as a link. But maybe you could clarify the situation, showing a bit more code could be helpful too.November 1, 2016 at 11:46 am #247278spitosdevParticipant
Yes thats the page the button is going to redirect.
This is how the “div” looks like:<form method=”post” action=”#” onsubmit=”return checkforblank()”><input type=”text” id=”username” name=”username” placeholder=”Username”><input type=”password” name=”password” placeholder=”Password”>
<input type=”submit” name=”submit” value=”LOGIN” class=”btn-login”>
<input type=”submit” name=”sumbit” value=”Create an account” class=”btn-registrer”>
</form>November 2, 2016 at 12:43 pm #247334ShikkedielParticipant
So does it actually submit anything or is it just a link? In case of the first, use the php (I assume) you have applied through
actionto redirect. If nothing is submitted but the button is merely a redirect then just don’t give it the
buttoninstead and use JS to redirect.
Many people here better at php than myself for sure.November 2, 2016 at 1:55 pm #247336BeverleyhParticipant
If your page is a PHP page (or ASP or other server-side script), it could be submitting to itself, assuming that there is some sort of processing script within the the same page?
Otherwise I would expect the action attribute to link to a file that contains a processing script. If that were the case, it would looking something like this
<form method="post" action="process-form.php" onsubmit="return checkforblank()">
Basically, what I’m trying to say, is that you should have some sort of processing script that does something with the submitted form data. You would usually put a page redirect there – at the end of the script after your processes have executed. In your case, the part of the processing script that deals with the “Create an account” submission would redirect to your Registrer.html page (although it’s unlikely to work in a .html page unless your server has been setup to parse PHP/ASP in .html pages).November 2, 2016 at 2:21 pm #247338
- The forum ‘Design’ is closed to new topics and replies.