Jump to content

Recommended Posts

I've got a SQL db running on my web server and I wanted to query some records in it back to a web page. I'm using MX V6.0. I can connect to my site & DB ok, can see the tables, and have created a Recordset. I've dragged a field from the recordset onto my web page, and when I try to preview it I get the following error:-

Parse error: parse error, unexpected T_STRING in /home/craftyiorg/public_html/TMP4kp26y67bj.php on line 5

My full code is:-

<?php require_once('Connections/Test.php'); ?>
<?php
mysql_select_db($database_Test, $Test);
$query_TestMatches = "SELECT MatchID, MatchTypeID, MatchSeasonID, MatchDateTime, MatchOpponent, MatchPlaceID, MatchStadium, MatchReferee, MatchGoals, MatchGoalsOpponent FROM tplss_matches ORDER BY MatchDateTime ASC";
$TestMatches = mysql_query($query_TestMatches, $Test) or die(mysql_error());
$row_TestMatches = mysql_fetch_assoc($TestMatches);
$totalRows_TestMatches = mysql_num_rows($TestMatches);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php echo $row_TestMatches['MatchID']; ?>
</body>
</html>
<?php
mysql_free_result($TestMatches);
?>

My connection is called 'test', and my Recordest is called 'TestMatches'.

I've also tried saving the .php file and ftping it onto my webspace, but it won't run from there either.

Has anyone got any ideas what may be causing this please?
Link to comment
https://forums.phpfreaks.com/topic/8167-unexpected-t_string-error/
Share on other sites

  • 4 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.