FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » combobox
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: combobox [message #177314 is a reply to message #177313] Thu, 08 March 2012 13:27 Go to previous messageGo to previous message
ecu_jon is currently offline  ecu_jon
Messages: 3
Registered: March 2012
Karma:
Junior Member
here is page5
there is the first 6 lines that set up stuff to connect to db.
the 4 if isset's get the Post variables from inputpage(above)
then the mysql insert into db command.
and it looks like it mangled the longer lines. the sql statement will
probably come out weird.
<html>
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<?php
$Status = $_POST["Status"];
$host="localhost"; // Host name
$username="user"; // Mysql username
$password="password"; // Mysql password
$db_name="name"; // Database name
$tbl_name="name"; // Table name
mysql_connect("$host", "$username", "$password")or die("cannot
connect"); //sql connection to db
mysql_select_db("$db_name")or die("cannot select DB"); //select db sql
command
if(isset($_POST['Client'])) $Client = $_POST['Client']; //check if
value from POST, sev variable to value
if(isset($_POST["Site"])) $Site = $_POST["Site"];
if(isset($_POST["Uname"])) $Uname = $_POST["Uname"];
if(isset($_POST["Uid"])) $Uid = $_POST["Uid"];
if(isset($_POST["Password"])) $Password = $_POST["Password"];
mysql_query("INSERT INTO client
(client, site, user, userid, password, status) VALUES('$Client',
'$Site', '$Uname', '$Uid', '$Password', '$Status') ")
or die(mysql_error()); //insert above variables into db
echo "user added".$Client;
mysql_close();
?>
<br><br>
<a href="./login_success.php">Back Home</a>
</body>
</html>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: which command to use
Next Topic: Parse error: syntax error, unexpected T_VARIABLE
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 13:56:27 GMT 2024

Total time taken to generate the page: 0.04098 seconds