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
https://forums.phpfreaks.com/topic/22501-please-tell-me-why-this-does-not-work/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.