Voting script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

Only.. I'm calling mine "submit" not "song"
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

part two of what you just posted is full of the parse errors that come up when you have quotes inside of quotes. Where did you get that code?
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

phpfreaks.com
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

It was in a comment though... because the comment I found was easier to understand then the actual tutorial. lol
User avatar
monkeyj
Forum Commoner
Posts: 82
Joined: Mon Dec 15, 2003 4:32 pm
Location: USA
Contact:

Post by monkeyj »

You think you could be so kind to look through it for me? :-p
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

EDIT: oops to late lol

Code: Select all

// its not line 53 but the lines before that

// starting with single quote 
echo '<div align="center"><b> 
<p>Thanks for your vote!</p> 
<p>The new rating for this submission is: 
$new_rating2 out of 5</p>"; // ending with double quote
} 

#echo '<div align="">'; is always the best for me.. open single / in between doubles ( than u dont need to escape them )
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

I don't believe "or" is even proper if statement syntax. try using || instead.

(or is proper syntax for mysql however)
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

... actually 'and' and 'or' are valid, and they work just like '&&' and "||'

http://us2.php.net/manual/en/language.o ... ogical.php
Post Reply