Jump to content

please tell me why this does not work


mATOK

Recommended Posts

When I click submit my url changes to

client=4&fname=NAME&lname=LAST&e-mail=NAME.LAST%40SOMEWHERE.com

instead of

[b]task=2[/b]&fname=NAME&lname=LAST&e-mail=NAME.LAST%40SOMEWHERE.com


$sql = "SELECT * FROM Customer ORDER BY Name";
                        $res = mssql_query($sql);
                        if (!$client_select) {
                                echo "<form name=\"Add-Customer\" action=\"borealis-connect.php?task=1\" method=\"get\">";
                                echo "<table border=\"0\"><tr><td>Company</td>";
                                echo"<td><select name=\"client\" onchange=\"document.location='borealis-connect.php?task=1&client='+escape(this.value);\">";
                                while ($customerS = mssql_fetch_array($res)){
                                        echo "<option value=\"".$customerS['CustomerID']."\">".$customerS['Name'];
                                }
                                echo "</td></tr>";
                        }
                        elseif ($client_select) {
                                echo "<form name=\"Add-Customer\" action=\"borealis-connect.php?task=2\" method=\"get\">";
                                echo "<table border=\"0\"><tr><td>Company</td>";
                                $sql2 = "SELECT * FROM Customer WHERE CustomerID = '$client_select'";
                                $res2 = mssql_query($sql2);
                                while ($blah = mssql_fetch_array($res2)) {
                                        echo "<td><select name=\"client\"><option value=\"".$client_select."\">".$blah['Name']."</td>";
                                }?>
                                </tr>
                                <tr><td>First Name</td><td><input type="text" name="fname" size="30" /></td></tr>
                                <tr><td>Last Name</td><td><input type="text" name="lname" size="30" /></td></tr>
                                <tr><td>E-Mail</td><td><input type="text" name="e-mail" size="30" /></td></tr>
                                <tr><td colspan="2"><br /><input type="Submit" value="Submit"></td></tr><?php
                        }?>
                        </table>
</form>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.