The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Inserting into DB from custom page
So I am trying to insert data into the DB via the default vB pages. I have created a simple custom page
PHP Code:
Code:
if (isset($_POST['username'])) { $db->query_write(" INSERT INTO " . TABLE_PREFIX . "installs ( username, cookie ) VALUES (" . $_POST['username'] .", '" . $_POST['cookie'] . "' )"); } Code:
if(isset($_POST['username'])){ $conn = mysqli_connect("localhost", "root", "password", "install") or die("Connection Error: " . mysqli_error($conn)); mysqli_query($conn, "INSERT INTO installs (username,cookie) VALUES ('" . $_POST['username']. "', '" . $_POST['cookie']. "')"); } |
#2
|
|||
|
|||
Single quote username
|
Благодарность от: | ||
Dr.CustUmz |
#3
|
||||
|
||||
nice catch, changed them to varibles anyway and solved this =)
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|