Re: INSERT into mySQL over PHP (internet)

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: INSERT into mySQL over PHP (internet)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9092@lists.php.net to get a copy of this message
> I'd like to have some kind of a GUI on the internet Could you not use phpMyAdmin?? Download it for free from http://www.phpwizard.net/projects/phpMyAdmin/ Cheers. Russ On Thu, 3 May 2001 15:43:11 +0200 Nils Wetterich <nwet@easy.de> wrote: > Hi NG > > Now that I finally realy work with the combination mySQL & PHP on a > Windows-machine I began to just love it. There's only one problem I > still have: > How can I INSERT data from a HTML-form to the database on the server? > I'd like to have some kind of a GUI on the internet so I could > administer and manage the database from everywhere I want. > Please look at what I have yet. Maybe you can find the prob and help > me. (I have the idea that "mysql_query()" can't work with the variables > ($uName & $eMail).) > > Thanx in advance, > > Yours Nils. > --------------------------------------------------------- > > $con = @mysql_connect("host", "user", "password") or > die("Oops... no > connect."); > $qry = "SELECT name, mail FROM TUsers"; > $res = mysql_db_query("database", $qry, $con); > // $ins = "INSERT INTO TUsers (name, mail) > // VALUES ($uName, $eMail)"; // ---------------> doesn't > work! $ins = "INSERT INTO TUsers (name, mail) > VALUES (\"Any Name\", "\and eMail\"); // ------> > works perfect! > > mysql_query($ins) or die("Sorry. Couldn't execute INSERT."); > > <form action="script.php" method="post"> > Name: <input type="text" name="uName"><br> eMail: <input > type="text" > name="eMail"><br> <input type="submit"> > </form> > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > #-------------------------------------------------------# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam e: r.j.michell@apu.ac.uk w: www.apu.ac.uk/webteam t: +44 (0)1223 363271 x 2331 www.theruss.com #-------------------------------------------------------#

« previous php.db (#9092) next »