mysql - Inserting data to db in PHP -
I am trying to insert somethig to db and after getting this code I get a blank page in php . Cam you help me? If I free up all the pages then I get an empty page, like now I get the Imprint Container
Query // ('INSERT IN' idoctor_db`. User '(`id`,` log in`, `password`,` name`, `level`] // value (' 5 ',' cave5 ',' rui ' 5 ',' Kevekeve 5 ',' 3 '); //'); }}? & Gt; & Lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Login & lt; / Title & gt; & Lt; link rel = "stylesheet" href = "css / login.css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div class = "container" & gt; & Lt; form action = "& lt ;? php create () ;? & gt;" Method = "post" & gt; & Lt; Input type = "text" name = "username" placeholder = "user name ..." /> & Lt; Input type = "password" name = "password" placeholder = "password" /> & Lt; Input type = "password" name = "password_conf" placeholder = "confirm password" / & gt; & Lt; Input type = "text" name = "nick" placeholder = "nick" /> & Lt; Input type = "submit" value = "create" name = "submit" /> & Lt; / Form & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;
If there is no error in running this query, you will see an empty page Will give
To ensure that all the work is done in the background, check out your mysql table to see if the inclusion works.
If you want to check the outcome of the query ... just do the following
$ result = $ db- & gt; Query ('INSERT IN' idoctor_db`. User '(`id`,` log in`, `password`,` name`, `level`] value (' 4 ',' kev4 ',' root ',' kevkev4 ',' 3 ');';); If ($ result) {echo 'success'; } Else {echo 'unsuccessful'; }
Comments
Post a Comment