473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

php programme is not working

i am trying to retrive the data from client
the programme is html page
Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2. <HEAD></HEAD>
  3. <BODY>
  4. <FORM METHOD=POST ACTION="check.php">
  5. Have you ever eaten haggis before?
  6. <INPUT NAME="Choice1" TYPE="Checkbox" VALUE="Haggis">
  7. <BR>
  8. Have you ever eaten snails before?
  9. <INPUT NAME="Choice2" TYPE="Checkbox" VALUE="Snails">
  10. <BR>
  11. Have you ever eaten locusts before?
  12. <INPUT NAME="Choice3" TYPE="Checkbox" VALUE="Locusts">
  13. <BR>
  14. <BR>
  15. <INPUT TYPE=SUBMIT>
  16. </FORM>
  17. </BODY>
  18. </HTML>
and save the file as check.html

Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2. <HEAD></HEAD>
  3. <BODY>
  4. <?php
  5. echo "$Choice1"<BR>;
  6. echo "$Choice2"<BR>;
  7. echo "$Choice3"<BR>;
  8.  
  9. ?>
  10. </BODY>
  11. </HTML>
and saved as check.php


but it is always showing the error as
Parse error: parse error in C:\wamp\www\deeraj\check.php on line 5
so pl..can any help me...
Oct 27 '09 #1
5 1496
Dheeraj Joshi
1,123 Expert 1GB
In check.php. You did no retrieved the value using $_POST.

Expand|Select|Wrap|Line Numbers
  1. $choice1 = $_POST['Choice1']; 
  2. $choice2 = $_POST['Choice2'];
  3. $choice3 = $_POST['Choice3'];
  4.  
  5. echo $choice1;
  6. echo "<br>";
  7. echo $choice2;
  8. echo "<br>";
  9. echo $choice3;
  10. echo "<br>";
  11.  
Use this link for reference PHP Manual

Regards
Dheeraj Joshi
Oct 27 '09 #2
Dormilich
8,658 Expert Mod 8TB
@dheerajjoshim
or taking the shortcut
Expand|Select|Wrap|Line Numbers
  1. echo $choice1, "<br>", $choice2, "<br>", $choice3, "<br>";
Oct 27 '09 #3
Dheeraj Joshi
1,123 Expert 1GB
@Dormilich
Smart... I like it

Regards
Dheeraj Joshi
Oct 27 '09 #4
Dormilich
8,658 Expert Mod 8TB
@dheerajjoshim
reading the manual actually pays off.
Oct 27 '09 #5
Dheeraj Joshi
1,123 Expert 1GB
Reading manual helps a lot...

Regards
Dheeraj Joshi
Oct 27 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: cm012b5105 | last post by:
Hello i want to put an interactive text programme in to a graphical box this is a small section of my text programme s = raw_input ("Hello whats your name? ") if s=='melvyn': print "your my...
0
by: melledge | last post by:
Full Programme for XTech 2005 Announced Premier European XML Industry Event Expands Focus to "XML, the Web and Beyond"; Co-hosted by the Mozilla Foundation,W3C, and OASIS, Presenters Include...
2
by: NDAKI MBOULET | last post by:
J'ai un problème pour écrire un programme. Voici mon sujet: Ecrire en c++ un programme qui reçoit en entrée une suite d'instruction encadrées par les mots clés BIBODLE et LISUK dans un langage...
5
by: Pekka Jarvela | last post by:
I am a beginner and have written a C++ programme in Visual Studio ..NET. Now, programme is for time being Console application (= works in DOS window). I would however like that it had graphical...
5
by: katekukku | last post by:
HI, I need the source code for a programme in C. It should have the basic features of a paint programme like circle, line etc, etc,. I lost a programme which wa driven by keyboard, if somebody...
6
by: =?ISO-8859-1?Q?FERHAT_A=C7ICI?= | last post by:
hi everyone...I want to run any programme or file with my programme.example any file or programme, like this "xxx.ncn".I want If users double click this xxx.ncn this file can run by my...
6
by: chang | last post by:
Hi ALL, I am working in C from past few months. Still now i can't figure out who is called main() in 'C' programme? Main() is a function from that we can call our sunroutines but someone has to...
12
by: mcarthybn | last post by:
hi , I am working on huge C programming project.I am doin debugging only by printf measn i dont have any dubugger .So it is very difficult know who is actually calling a function and i am stuck...
3
by: vineet1987 | last post by:
i have already written my code using the neural network logic....and it works fine... it is basically a hand written character recognition system...which accepts "bitmap" image files which i made...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.