Join the Stack Overflow Community
Stack Overflow is a community of 6.4 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

Evening all,

I am having an issue with this script and i'm hoping one of you fine programmers could let me know where the error is.

<?php

mysql_connect("127.0.0.1", "root", "") or die (mysql_error());
echo "Connected to MYSQL ";
mysql_select_db("tutorial") or die (mysql_error());
echo "Connected to Data Base"
$query = "SELECT * FROM forr1";
$result = mysql_query ($query) or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
        echo $row['input1'];


?>

The Output

Parse error: syntax error, unexpected '$query' (T_VARIABLE) in C:\Program Files (x86)\EasyPHP-12.1\www\Output.php on line 7

I must be missing something significant because no matter how i try and rework it i get the same error.

Thanks for your time

Ben

share|improve this question

closed as too localized by Felix Kling, nickb, John Conde, Mike B, Guru Apr 2 '13 at 14:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
You're missing a semi-colon on your echo line – andrewsi Apr 2 '13 at 13:03
    
down votes kinda unnecessary – IgotaHat Apr 2 '13 at 13:11
up vote 5 down vote accepted

Missing semi-colon on the line prior:

echo "Connected to Data Base"

Terminate the statement:

echo "Connected to Data Base";
share|improve this answer
    
Thanks man wow i feel silly i really need to go to bed :/ – IgotaHat Apr 2 '13 at 13:06
    
I will give you Correct answer tick soon as the accept time finish's – IgotaHat Apr 2 '13 at 13:07
    
@bennyboy Plenty of time for that, glad you're sorted. – Grant Thomas Apr 2 '13 at 13:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.