I have been trying to use and insert statement with the following PHP code:
There's more to the page, but it's up to this point that it goes wrong. This is what appears in the browser when I run the script (and the mysql_query($query) is line 15):
(Do you love me)
(Question)
INSERT INTO Sentence (SentenceManner) VALUES ('Question') where SentenceID=2
Fatal error: Function name must be a string in G:\ on line 15
Any suggestions, please. This is for an academic project and it's coming up due!
Code:
<?php
session_start();
$_SESSION['SentenceText'] = $_POST['SentenceText'];
$_SESSION['SentenceManner'] = $_POST['SentenceManner'];
echo' <p>('.stripslashes($_SESSION['SentenceText']).')<br/>('.$_SESSION['SentenceManner'].')</p>';
$title='SecondPage';
include ('functions.inc');
db_logon();
html_head($title);
$query="INSERT INTO Sentence (SentenceManner) VALUES ('".$_SESSION['SentenceManner']."') where SentenceID=".$_SESSION['SentenceID']."";
echo $query;
mysql_query($query) or die($mysql_error());
(Do you love me)
(Question)
INSERT INTO Sentence (SentenceManner) VALUES ('Question') where SentenceID=2
Fatal error: Function name must be a string in G:\ on line 15
Any suggestions, please. This is for an academic project and it's coming up due!