Re: Problem with PhP - SQL query

From: Date: Tue, 17 Jan 2017 15:36:37 +0000
Subject: Re: Problem with PhP - SQL query
References: 1  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-25494@lists.php.net to get a copy of this message
On 17 January 2017 at 15:25, Arthur Carvalho <arthur.carvalho2960@gmail.com> wrote: > Hello, > > I have a problem with my php code. > > I hope you will answer ! > Hello. This is the mailing list for people having issues/comments/feedback on the PHP website itself, not a support channel. Please take a look here for another channel for support: http://php.net/support.php > > I'm working for my Baccalauréat exam and this code is very important.. > > I'm trying to creating an SQL table and the name of this table is a text > imported from another page with the POST method, and the problem seems to > be in the local variable I'm trying to include in the sql query: > > <?php > > $a = $_POST['auteur']; > try > > { > $bdd = new PDO('mysql:host=***;dbname=***','***','***'); > } > > catch(Exception $e) > > { > die('Erreur : '.$e->getMessage()); > } > > $query = "CREATE TABLE IF NOT EXISTS $a ( > id INT NOT NULL AUTO_INCREMENT PRIMARY KEY)"; > > header("Location: Gestion Catalogue.php/"); > ?> > > Please I do need your help ! > -- > Arthur CARVALHO > +33 6 30 81 11 78 > arthur.carvalho2960@gmail.com > -- Mike Griffiths mgriffiths@gmail.com

« previous php.webmaster (#25494) next »