on php or html page how can i do this:
name
password
and many buttons
if user press button1 he we redirct to :
http://domain.com/login.php?button1=123&name=test&password=111
buttom2:
http://domain.com/login.php?button2=456&name=test&password=111
buttom3:
http://domain.com/login.php?button3=789&name=test&password=111
Thank you
You have this simple option according to me.
<form action='login.php' method='get'>
<input type='text' name='name'>
<input type='password' name='password'>
<input type='submit' name='button1' value='123'>
<input type='submit' name='button2' value='456'>
<input type='submit' name='button2' value='789'>
</form>
Hope it helps
Related
I need to somehow secure source code of paypal button, so users can't change amount of money. But I also need user's input (custom input - Nickname for some game), because I'm using this input in IPN.
This is my code for paypal button:
<form name="_xclick" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="POST">
<input type="hidden" name="cmd" value="_xclick">
<input name='currency_code' type='hidden' value='CZK'
<input name='business' type='hidden' value='DHWYTXXXXXXXX'>
<input name='item_name' type='hidden' value='VIP Membership on server XXX'>
<input name='amount' type='hidden' value='5.00'>
<input name='lc' type='hidden' value='CZ'>
<input name='no_shipping' type='hidden' value='1'>
<input name='no_note' type='hidden' value='1'>
<input name='custom' type='text' placeholder='Nickname' required='required'>
<input name='notify_url' type='hidden' value='https://example.cz/paypal/ipn_process.php'>
<input name='return_url' type='hidden' value='https://example.cz/paypal/ipn_success.php'>
<input name='rm' type='hidden' value='2'>
<input type='submit' class='paypalSubmit' name='submit' value='Buy now'>
</form>
I tried encrypting it with OpenSSL, but I need user's input, so that didn't work.
So, Is there any other way how to protect the amount (or encrypt it, but also be able and use user's input), so users can't change the price?
Thank you very much! :)
I have a upload button but after i upload something i does not refresh the page. i thougt this would work but is doesnt:
function refreshPage(){
window.location.reload();
}
<span class="ff-b white ttu f21">UPLOAD<input type="button" onClick="refreshPage()"/>Close</span>
Do some body of you know how to fix this ?
Kind regards.
<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit">
</form>
<form action="LoginServlet" method="post">
Username: <input type="text" name="username">
Password: <input type="password" name="password">
<input type="submit" value="Login">
</form>
I need to retrieve the 'username' parameter in 'ChangePasswordServlet' as well.
Please help me with the format. I have tried searching for it but did not find any solution.
Add a second button for changing the password:
<input type="submit" value="Change Password" formaction="ChangePasswordServlet">
I have created a dynamic form using vbscript. It displays fine but when I click on submit button it does not post the page back... Can anyone help me? Code I have written is:
<form method="post" action="home.asp">
<%if session("id")="" then
response.write("<div id=logindiv>Login ID: <input type=text ID=loginID name=loginID /><br/><br/>Password: <input type=password ID=password name = password/><br/><br/><a href=register.asp/>Sign Up</a> <input type=submit id=loginbtn name=loginbtn value=Login /></div>")
else
response.write("already logged in")
end if%>
</form>
The resulting html is this:
<form method="post" action="home.asp">
<div id=logindiv>Login ID: <input type=text ID=loginID name=loginID /><br/><br/>Password: <input type=password ID=password name = password/><br/><br/><a href=register.asp/>Sign Up</a> <input type=submit id=loginbtn name=loginbtn value=Login /></div>
</form>
Looks like you have an extra / in your anchor tag:
<a href=register.asp/>
Maybe unrelated, but if it's closing the element, the after "Sign Up" could be screwing up the .
I've create a RSS submission form and I want to show in the input box something like Enter your email here...., and when they click on it that message should be disappear and they can put their email in the box.
Here is the code I'm using at the moment
<div id="RSS">
<form action="http://feedburner.google.com/fb/a/mailverify" class="RSS" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=RSS', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<input type="hidden" name="uri" value="RSS">
<input type="hidden" name="loc" value="en_US">
<input name="email" id="RSS-text" type="text" maxlength="100" style="width:160px !important" value="Enter your email address..." class=""><button type="submit" id="RSS-button">Subscribe</button>
</form>
</div>
The problem is that it doesn't disappear when someone click on it, and I saw many forms including my search form it can be done that way.
You can use the placeholder attribute, but it doesn't support IE:
<input type="text" placeholder="Enter your text here..." />
Otherwise you can use a bit of javascript:
<input type="text" onfocus="if(this.value=='Enter your text here...') this.value='';" onblur="if(this.value=='') this.value='Enter your text here...';" value="Enter your text here..." />