Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Php Error-where To Put "?>"
Eggie
post Feb 18 2008, 01:05 AM
Post #1


Advanced Member
Group Icon

Group: [HOSTED]
Posts: 175
Joined: 19-January 08
From: Zagreb/Croatia
Member No.: 27,735



lol....lately i have many problems in writing my scripts and i dont know if i should create post only for purpose so ppl can help me or should i create many post like i am doing right now...i am NOT making this to get many credits...i am doing it because i need help and many people here help me!

CODE
if ($_GET['action']!='race'){
<form name="form2" method="get" action="race.php?action=race">
<tr><td>Who do you wanna race?</td><td>
    <select size=5 name="bike">
    <option value="Derbi Senda 50">Derbi Senda 50</option>
    <option value="Honda NS 50 R">Honda NS 50 R</option>
    <option value="Suzuki ZR 50">Suzuki ZR 50</option>
    <option value="Yamaha DT 50 MX">Yamaha DT 50 MX</option>
    <option value="Aprilia RS 50">Aprilia RS 50</option>
    </select>-<a href="java script:launchClasses()">?</a>
    <input type=submit value=Register>  
</td>
</tr>
</form>
}

i have this code...if i put <?php before it and ?> after it i get
QUOTE
Parse error: syntax error, unexpected '<' in C:\wamp\www\race.php on line 27
if i put ?> directly after if clause like this
CODE
<?php if ($_GET['action']!='race')?>{//codes}

the brackets are printed out and it doesnt help...
and if i put it after like this:
CODE
<?php if ($_GET['action']!='race'){?>//codes}

i get this
QUOTE
Parse error: syntax error, unexpected $end in C:\wamp\www\race.php on line 41

i hope my problem is understandable and you can help me....thnx
Go to the top of the page
 
+Quote Post
vujsa
post Feb 18 2008, 05:22 AM
Post #2


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714



Try this:
CODE
if ($_GET['action']!='race'){?>
<form name="form2" method="get" action="race.php?action=race">
<tr><td>Who do you wanna race?</td><td>
    <select size=5 name="bike">
    <option value="Derbi Senda 50">Derbi Senda 50</option>
    <option value="Honda NS 50 R">Honda NS 50 R</option>
    <option value="Suzuki ZR 50">Suzuki ZR 50</option>
    <option value="Yamaha DT 50 MX">Yamaha DT 50 MX</option>
    <option value="Aprilia RS 50">Aprilia RS 50</option>
    </select>-<a href="java script:launchClasses()">?</a>
    <input type=submit value=Register>  
</td>
</tr>
</form>
<?php}?>


This is one of the nicest features available in PHP but can be very confusing at times if you forget what is an isn't going to be shown when.

By the way, don't worry about the multiple topics... As long as each is different, you can have a million topics! In fact, it is easier for later users to find information and discussion they want to participate in if the topics are separate. Not that you care, but from an SEO point of view, separate topics would score higher.

Hope this helps.

vujsa

Go to the top of the page
 
+Quote Post
Eggie
post Feb 18 2008, 12:04 PM
Post #3


Advanced Member
Group Icon

Group: [HOSTED]
Posts: 175
Joined: 19-January 08
From: Zagreb/Croatia
Member No.: 27,735



SOLVED
thanx vujsa..
as i said i like this forum cause many people are willing to help and they get credits for it so thats great way for doing it...
when i complete my game i hope my hosting will be approved at last tongue.gif
cya later with more questions to come...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Ffow: Frontlines: Fuel Of War(1)
  2. Cpanel Error When Loggin In...(4)
  3. Purchase Credit Error(0)
  4. Bid For Power Opengl Error [solved](6)
  5. Cant Find The Error(2)
  6. Strange Error When Trying To Install Fedora Core 9(5)
  7. Error Connecting To Domain(2)
  8. Common Ftp Server Error Codes(0)
  9. Error 406 - Problem In My Phpbb Forum(8)
  10. Java Applet Loading Error(5)
  11. Bsod Error & It's Causes(6)
  12. I Have An Error With My Mysql Connection(7)
  13. Mysql Storage Engine Error 28(5)
  14. Dreamweaver 8 Issue(9)
  15. Windows XP Error: Explorer Crashes While Drag & Drop(14)
  1. Linux Basic Command - For Storing Compilation Error To File(1)
  2. Itunes Album Art(6)
  3. My First Google Error(8)
  4. Help Needed: Monitor Out Of Timing(6)
  5. Sql Syntax Error [corrected](2)
  6. Warning: Mysql_num_rows()(1)
  7. Lost Connection To Mysql ,..., System Error: 111 In(3)
  8. Grub Error After Reinstalled Winxp(11)
  9. Send Mail Through Outlook Express(7)
  10. Error While Activing Hosting Account - Resolved(7)
  11. Cursor-for-loop Out Of Bounds Error(8)
  12. Mysql Connect Error, Too Many Connections.(1)
  13. Error In Installing MySQL Server(6)
  14. Help! Cannot Load Windows Desktop!(7)
  15. Changed Domain Name, My Web-mail Gives A 550 Error(1)


 



- Lo-Fi Version Time is now: 11th October 2008 - 06:26 AM