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 06-11-2005, 06:34 PM errors...
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
t his is the only error im receiving...
Parse error: parse error, unexpected '=' in c:\program files\easyphp\www\pushedtomb\nav1.php on line 6

PHP Code:
<!-- Navigation -->
 <table width="100%" height="75%" border="0" bordercolor="#FFFFFF">
 <tr>
   <td width="17%" height="483" align="center" valign="top" class="bgblend" scope="col"><p>-  Menu  -</p>
   <hr align="left" width="100%" class="btn_header">
     <p><a href="<?php echo $PHP_SELF?id="$id"&amp;page="$page"&amp;=?>">Home</a></p>
     <p>&nbsp;</p>
     <p><a href="<?php $PHP_SELF;?>?id=$id&amp;page=$page&amp;=">Links</a></p>
     <p>&nbsp;</p>
     <p><a href="<?php $PHP_SELF;?>?id=$id&amp;page=$page&amp;=">Downloads</a></p>
     <p>&nbsp;</p>
     <p><a href="<?php $PHP_SELF;?>?id=$id&amp;page=$page&amp;=">News</a></p>
     <p>&nbsp;</p>
     <p><a href="<?php $PHP_SELF;?>?id=$id&amp;page=$page&amp;=">Contact</a></p>
     <p>&nbsp;</p>
     <p><a href="<?php $PHP_SELF;?>?id=$id&amp;page=$page&amp;=" class="style4">Forums</a></p>
     <p>&nbsp;</p>
     <p><a href="<?php $PHP_SELF;?>?id=$id&amp;page=$page&amp;=">Stats</a></p>
     <p>&nbsp;</p>
     <p>
is any of that correct?
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-11-2005, 06:39 PM
feraira's Avatar
BeTheBand!

Posts: 350
Trades: 0
When you do the variables in a URL, you cant just do

blahblah&id=$id

Do - blahblah&id=".$id."

Example:
PHP Code:
$user =$_GET['user'];
<
a href=\"./?p=compose&user=".$user."\"> 
You need to get the variable before you print it out anywhere, hope that helps a lil bit.. All of it looks fine
feraira is offline
Reply With Quote
View Public Profile
 
Old 06-11-2005, 06:56 PM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
thats sorted now.. but another thing has cropped up... it only displays the Forums link
PHP Code:
<!-- Navigation -->
<table width="100%" height="75%" border="0" bordercolor="#FFFFFF">
<tr>
  <td width="17%" height="483" align="center" valign="top" class="bgblend" scope="col"><p>-  Menu  -</p>
  <hr align="left" width="100%" class="btn_header">
    <p><a href="<?php echo $PHP_SELF;?>?id=".$id."&amp;page=".$page."&amp;=">Home</a></p>
    <p>&nbsp;</p>
    <p><a href="<?php echo $PHP_SELF;?>?id=".$id."&amp;page=".$page."&amp;=">Links</a></p>
    <p>&nbsp;</p>
    <p><a href="<?php echo $PHP_SELF;?>?id=".$id."&amp;page=".$page."&amp;=">Downloads</a></p>
    <p>&nbsp;</p>
    <p><a href="<?php echo $PHP_SELF;?>?id=".$id."&amp;page=".$page."&amp;=">News</a></p>
    <p>&nbsp;</p>
    <p><a href="<?php echo $PHP_SELF;?>?id=".$id."&amp;page=".$page."&amp;=">Contact</a></p>
    <p>&nbsp;</p>
    <p><a href="<?php echo $PHP_SELF;?>?id=".$id."&amp;page=".$page."&amp;=" class="style4">Forums</a></p>
    <p>&nbsp;</p>
    <p><a href="<?php echo $PHP_SELF;?>?id=".$id."&amp;page=".$page."&amp;=">Stats</a></p>
    <p>&nbsp;</p>
    <p>
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
Old 06-11-2005, 07:10 PM
feraira's Avatar
BeTheBand!

Posts: 350
Trades: 0
Can you send a screenshot of it please? www.imageshack.com (i think)

From what i see, the only thing different is the "class"
feraira is offline
Reply With Quote
View Public Profile
 
Old 06-11-2005, 07:15 PM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
http://img85.echo.cx/img85/659/site15tf.jpg
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
Old 06-12-2005, 09:19 AM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
PHP Code:
<!-- Navigation -->
 
 <table width="100%" height="75%" border="0" bordercolor="#FFFFFF">
 <tr>
   <td width="17%" height="483" align="center" valign="top" class="bgblend" scope="col"><p>- Menu -</p>
     <hr align="left" width="100%" class="btn_header">
 <p><a href="<?php echo $PHP_SELF;?>?id="<? echo $id;?>"&page="<? echo $page;?>"&sid=">Home</a></p>
     <p>&nbsp;</p>
 <p><a href="<?php echo $PHP_SELF;?>?id="<? echo $id;?>"&page="<? echo $page;?>"&sid=">Links</a></p>
     <p>&nbsp;</p>
 <p><a href="<?php echo $PHP_SELF;?>?id="<? echo $id;?>"&page="<? echo $page;?>"&sid=">Downloads</a></p>
     <p>&nbsp;</p>
 <p><a href="<?php echo $PHP_SELF;?>?id="<? echo $id;?>"&page="<? echo $page;?>"&sid=">News</a></p>
     <p>&nbsp;</p>
 <p><a href="<?php echo $PHP_SELF;?>?id="<? echo $id;?>"&page="<? echo $page;?>"&sid=">Contact</a></p>
     <p>&nbsp;</p>
 <p><a href="<?php echo $PHP_SELF;?>?id="<? echo $id;?>"&page="<? echo $page;?>"&sid=" class="style4">Forums</a></p>
     <p>&nbsp;</p>
 <p><a href="<?php echo $PHP_SELF;?>?id="<? echo $id;?>"&page="<? echo $page;?>"&sid=">Stats</a></p>
     <p>&nbsp;</p>
     <p>
it still isnt showing all the links, only forums... any ideas?
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 06:18 AM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
all sorted now... but on a diff page im gettin an annoying error....

PHP Code:
<?php 
include('header1.php');
?>

<?php include('nav1.php');?>
    <td width="83%" align="center" valign="top" class="bgblend" scope="col"><p align="center">
      <form method="post" name="links" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        <table align="center">
          <tr valign="baseline">
            <td nowrap align="right" class="style4">Title:</td>
            <td><input name="title" type="text" class="btn_header" value="" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right" class="style4">Url:</td>
            <td><input name="url" type="text" class="btn_header" value="" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right" class="style4">Description:</td>
            <td><input name="description" type="text" class="btn_header" value="" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right" class="style4">Date:</td>
            <td><input name="date" type="text" class="btn_header" disabled value="<?php echo date("d-m-Y");?>" size="32"></td>
          </tr>
          <tr valign="baseline">
            <td nowrap align="right">&nbsp;</td>
            <td><input type="submit" class="btn_header" value="Submit"></td>
          </tr>
        </table>
      </form>
      </p></td><?php include('right.php');?>
</table>
</body>
</html>
<p>
  <?php //footer
include('footer1.php');
?>
</p>
<?php
if(isset($_POST['submit'])) {
include(
'connection.php');
$message NULL;
if(empty(
$_POST['title'])){
        
$message .= 'You need to enter a title';
        
$title FALSE;
} else {
        
$title = ($_POST['title']);
}
if(empty(
$_POST['url'])){
        
$message .='You need to enter a URL';
        
$url FALSE;
} else {
        
$url = ($_POST['url']);
}
if(empty(
$_POST['date'])){
        
$message .='You need to enter the date';
        
$date FALSE;
} else {
        
$date = ($_POST['date']);
}    
$result1 mysql_query("INSERT INTO links 'id', 'title', 'url', 'des', 'date' VALUES '', '$title', '$url', '$des', '$date'") or die("Could not insert due to" .mysql_error());
***
Line 63*** if("$results1") or die("Could not insert due to" .php_error(). .mysql_error()); ***Line 63***
mysql_close();
?>
error.... Parse error: parse error, unexpected T_LOGICAL_OR in c:\program files\easyphp\www\pushedtomb\addlinks.php on line 63
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 08:07 AM
0beron's Avatar
Defies a Status

Posts: 1,832
Location: Somewhere else entirely
Trades: 0
Try dropping the quotes around $result1?
__________________
UPDATE 0beron SET talkupation = talkupation + lots WHERE post = 'helpful';

Please login or register to view this content. Registration is FREE
(aka MSN handwriting for forums)
0beron is offline
Reply With Quote
View Public Profile Visit 0beron's homepage!
 
Old 06-14-2005, 09:10 AM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
nope still get the same error.. tried changing if($result) to while(mysql_fetch_array($result)) and still the same
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 10:02 AM
Anacrusis's Avatar
Defies a Status

Posts: 2,099
Name: Adam
Location: Colchester CT
Trades: 0
You can't use the "or die" method with if statements. Try changing line 63 to this:
PHP Code:
if (!$results1
    die(
"Could not insert due to" .php_error()."<br />" .mysql_error()); 
Anacrusis is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 12:36 PM
pushedtomb's Avatar
Super Talker

Posts: 100
Name: Nathen
Location: Casnewydd, De Cymru, UK
Trades: 0
PHP Code:
$result1 mysql_query("INSERT INTO links 'id', 'title', 'url', 'des', 'date' VALUES '', '$title', '$url', '$des', '$date'") or die("Could not insert due to" .mysql_error());
 if (!
$results1)
     die(
"Could not insert due to" .php_error()."<br />" .mysql_error());
 
mysql_close();
 ***
line 66?>***line 66 
now the error moves

Parse error: parse error, unexpected $ in c:\program files\easyphp\www\pushedtomb\addlinks.php on line 66
__________________

Please login or register to view this content. Registration is FREE


Quote:
- "I've often wondered how MS can say that other software "isn't compatible" with MS when MS stuff isn't even compatible with other MS stuff" - quote from Daily Thing.com
pushedtomb is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to errors...
 

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.36688 seconds with 12 queries