0

<?php
$conn = new mysql('localhost', 'root', 'adm1ns');
$sq1 ="INSERT INTO data VALUES(?,?,?);
$stmt = $conn->stmt_init();
$stmt->prepare($sql);
$stmt->bind_param("sss",$instance,$instance,$instance);
$stmt->execute();
$stmt->fetch();
?>


i use this code to store the data in mysql given by user...

in sixth line i am getting a error "unexpected T_STRING" i cant cant this error pls help me

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by nawabsheriff
0

<?php
$conn = new mysql('localhost', 'root', 'adm1ns');
$sq1 ="INSERT INTO data VALUES(?,?,?);
$stmt = $conn->stmt_init();
$stmt->prepare($sql);
$stmt->bind_param("sss",$instance,$instance,$instance);
$stmt->execute();
$stmt->fetch();
?>


i use this code to store the data in mysql given by user...

in sixth line i am getting a error "unexpected T_STRING" i cant cant this error pls help me

<?php
$conn = new mysql('localhost', 'root', 'adm1ns');
$sq1 ="INSERT INTO data VALUES(?,?,?);
$stmt = $conn->stmt_init();
$stmt->prepare($sql);
$stmt->bind_param("sss",$instance,$instance,$instance);
$stmt->execute();
$stmt->fetch();
?>


Hey you have done mistake in your line 2.
look
$sq1 ="INSERT INTO data VALUES(?,?,?);
Close it like
$sq1 ="INSERT INTO data VALUES(?,?,?)";

ok
http://www.jagadishwor.com.np

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.