Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 09-17-2010, 08:35 PM error-can't see it
Average Talker

Posts: 17
Name: charlie
Trades: 0
I hate to ask-I had this working earlier-had to mess with it. Now I get:?
Quote:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\hofiles\currentmaint.php on line 12

PHP Code:
<?php
mysql_connect
(localhost,root,"");
mysql_select_db(maintdb) or die( "Unable to select database");
if(!empty(
$_POST["submit"]))
{
 
$compmo $_POST['compmo'];
$query="SELECT * FROM maintdata Where compmo='$compmo'";
$result=mysql_query($query);
if(
mysql_num_rows($result))
{
  echo 
"<form action='#' method='post'><b>Poject: Maintenance Log</b><br /><br />;
echo "
<table cellspacing=1 cellpadding=1 border='0'>
<
tr>
    <
TH>Apt</TH>
    <
TH>Name</TH>
    <
TH>Received</TH>
    <
TH>Time</TH>
    <
TH>Problem</TH>
    <
TH>Correction</TH>
    <
TH colspan=3>Finished</TH>
    <
TH>Ord#</TH>     
    
</tr>";
while(
$row = mysql_fetch_array($result))
{
echo "
<tr>";
echo "
<td>" . $row['apt'] . "</td>";
echo "
<td>" . $row['name'] . "</td>";
echo "
<td>" . $row['datereceived'] . "</td>";
echo "
<td>" . $row['time'] . "</td>";
echo "
<td>" . $row['symptom'] . "</td>";
echo "
<td>" . $row['action'] . "</td>";
echo "
<td>" . $row['compmo'] . "</td>";
echo "
<td>" . $row['compday'] . "</td>";
echo "
<td>" . $row['compyear'] . "</td>";
echo "
<td>" . $row['ordno'] . "</td>";
echo "
</tr>";
}
echo "
</table>
mysql_close();
?>
<form method="post" action="#">
 <br />
 <input type="text" name="compmo"/> <p>
<input type="submit" name="submit" value="select maintenance month"/>
</form>
ckdoublenecks is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-17-2010, 08:37 PM Re: error-can't see it
Novice Talker

Posts: 8
Name: Paul
Trades: 0
right here
echo "</table>
should be
echo "</table>";
__________________

Please login or register to view this content. Registration is FREE
paultbk is offline
Reply With Quote
View Public Profile Visit paultbk's homepage!
 
Old 09-17-2010, 08:45 PM Re: error-can't see it
Average Talker

Posts: 17
Name: charlie
Trades: 0
thanks for the response but that made no difference ?
ckdoublenecks is offline
Reply With Quote
View Public Profile
 
Old 09-17-2010, 09:08 PM Re: error-can't see it
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
PHP Code:
echo "<form action='#' method='post'><b>Poject: Maintenance Log</b><br /><br />; 
should be
PHP Code:
echo "<form action='#' method='post'><b>Poject: Maintenance Log</b><br /><br />"
Try using an editor with syntax highlighting like notepad++. Syntax errors involving quotes will be much easier to spot.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 09-17-2010, 09:49 PM Re: error-can't see it
Average Talker

Posts: 17
Name: charlie
Trades: 0
got this
Quote:
Parse error: syntax error, unexpected $end in C:\xampp\htdocs\hofiles\currentmaint.php on line 48
ckdoublenecks is offline
Reply With Quote
View Public Profile
 
Old 09-17-2010, 09:54 PM Re: error-can't see it
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
You're missing two closing brackets. Tab your code.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 09-17-2010, 10:43 PM Re: error-can't see it
Average Talker

Posts: 17
Name: charlie
Trades: 0
thanks guys
ckdoublenecks is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to error-can't see it
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.48083 seconds with 12 queries