PHP, What am i doing wrong?

Soldato
Joined
27 Aug 2004
Posts
17,111
Location
Geordieland
Below is some simple PHP coding, but i cant see what im doing wrong with it. Can anyone guide me as to where my balls up is please? The submit button is working but when i am hitting submit its just displaying $camelChoice"; ?>

HTML
Code:
    <form action="adopt.php" method="get">
    <p>
		Select your camel type:
    </p>
        <select name="CamelType">
        <option value="MaleBac">Male Bactrian</option>
        <option value="FemaleBac">Female Bactrian</option>
        <option value="MaleDrom">Male Dromedary</option>
        <option value="FemaleDrom">Female Dromedary</option>
        </select>
    </form>

PHP Response
Code:
	<?php
		$camelChoice = $_GET['CamelType'];

		echo "<p>Camel Type: $camelChoice</p>";
	?>

Any help hugely appreciated.
 
Jaffa_Cake said:
You are using a PHP enabled server offline right?

Ah crap, forgot to get the offline apache web server files, that would be why. Anyone fancy slapping me :o

Can you tell its the first time ive used PHP :p
 
Sitting here now with apache etc enabled and i cant get it to work. The values are passing over but i cant get them to print out onto the screen?

Any help greatly appreciated.

Code:
EDIT - sorted :)
 
Last edited:
Yep its working

Code:
PHP Version 5.0.4

System 	Windows NT C71174428 5.1 build 2600
Build Date 	Mar 31 2005 02:44:34
Configure Command 	cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"
Server API 	Apache 2.0 Handler
Virtual Directory Support 	enabled
Configuration File (php.ini) Path 	C:\WINDOWS\php.ini
PHP API 	20031224
PHP Extension 	20041030
Zend Extension 	220040412
Debug Build 	no
Thread Safety 	enabled
IPv6 Support 	enabled
Registered PHP Streams 	php, file, http, ftp, compress.zlib
Registered Stream Socket Transports 	tcp, udp
 
Ive already clicked about changing it to post and done it. Ill cry if ive spent the last 3 hours crying at dreamweaver if its a simple few typos.
 
Back
Top Bottom