Click to See Complete Forum and Search --> : Problem using form-post


sgriffiths
07-14-2006, 05:50 AM
Hello all i have a problem, when i run the below piece of html, nothing returns

But when i just copy the link in the form post bit into the url, it works, can anyone please advise whats wrong with the code?

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html><head><title>SMS Card - SMS Gateway</title><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<form method="post" action="http://intext.smscard.com/?a=api_balance&login=cdmsdev&password=cdmsdev">

<div align="center">
<font face="Verdana, Arial, Helvetica, sans-serif" size="3">
<form method="post" action="/">
<input type="hidden" name="a" value="new">
<table border="0" cellpadding="3">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<b>Message:</b>
</font></td>
<input type="text" name="user" maxlength="160" size="60">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<small>(Any message upto 160 characters)</small>
</font></td></tr>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<br><b>Mobile number:</b>
</font></td>
<input type="text" name="mobile" maxlength="11" size="30">
<font face="Verdana, Arial, Helvetica, sans-serif" size="2"> <small>(11 digits starting 077, 078 or 079)</small>
</font></td></tr>
</font>
<br>
<input type="submit" value="Send Message">



</form>
</body>
</html>

gil davis
07-14-2006, 07:14 AM
I've never seen anyone try to pass parameters in the action of a form. I think that when the form is submitted, it will replace that stuff with what is in the form. Here is my suggestion:

<form method="post" action="http://intext.smscard.com/">
...
<input type="hidden" name="a" value="api_balance">
<input type="hidden" name="login" value="cdmsdev">
<input type="hidden" name="password" value="cdmsdev">
...

kiwibrit
07-14-2006, 07:25 AM
The action attribute of the from element specifies a form processing agent.

Charles
07-14-2006, 07:29 AM
I'm thinking that the nested FORMs are also going to be a problem.