create a form with a post

Thread Solved

Join Date: Mar 2009
Posts: 27
Reputation: achiman is an unknown quantity at this point 
Solved Threads: 0
achiman achiman is offline Offline
Light Poster

create a form with a post

 
0
  #1
Mar 8th, 2009
please can anyone tell me how i can create a form with check boxes and also a submit button using post.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 15
Reputation: Bob Arctor is an unknown quantity at this point 
Solved Threads: 1
Bob Arctor Bob Arctor is offline Offline
Newbie Poster

Re: create a form with a post

 
0
  #2
Mar 8th, 2009
You may want to have a look here -
http://www.daniweb.com/forums/thread159723.html
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 27
Reputation: achiman is an unknown quantity at this point 
Solved Threads: 0
achiman achiman is offline Offline
Light Poster

Re: create a form with a post

 
0
  #3
Mar 8th, 2009
thanks for the link but im using ms access and not mysql. so please if you can help aspa
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,365
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 164
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: create a form with a post

 
0
  #4
Mar 8th, 2009
access & asp, or php?
this is the php forum, here is a php solution to the question asked, no database mentioned in the op, what are you actually looking for
  1. <?php
  2. if($_POST){
  3. echo 'submitted were<br>';
  4. foreach ($_POST as $key => $value) {
  5. echo $key." value ".$value.'<br>';} }
  6. ?>
  7. <form action='<?php echo $_SERVER['php_self']; ?>' method='post'>
  8. <input type='checkbox' value='yes' name='1'> checkbox 1<br>
  9. <input type='checkbox' value='yes' name='3'> checkbox 3<br>
  10. <input type='checkbox' value='yes' name='5'> checkbox 5<br>
  11. <input type='checkbox' value='yes' name='7'> checkbox 7<br>
  12. <input type='checkbox' value='yes' name='9'> checkbox 9<br>
  13. <input type='radio' value='yes' name='10'> Yes <input type='radio' value='no' name='10'> No<br>
  14. <button TYPE="submit" name="submit" value="submit" onclick="return(confirm('Are you sure, \nthis is such a trivial example'));">Submit</button>
  15. </form>
Last edited by almostbob; Mar 8th, 2009 at 8:22 pm.
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 27
Reputation: achiman is an unknown quantity at this point 
Solved Threads: 0
achiman achiman is offline Offline
Light Poster

Re: create a form with a post

 
0
  #5
Mar 9th, 2009
its for a ms access database and php, i want customers to be able to select or tick various things they want in our services and when they click the submit button depending on the things they selected our database should return two of our package that will best suit them
Last edited by achiman; Mar 9th, 2009 at 1:34 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,365
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 164
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: create a form with a post

 
0
  #6
Mar 9th, 2009
Originally Posted by achiman View Post
its for a ms access database and php, i want customers to be able to select or tick various things they want in our services and when they click the submit button depending on the things they selected our database should return two of our package that will best suit them
And you want to do this without even knowing how to create a form,
Before you begin, you need to read a lot, and practice on a dummy dataset
you need the details on how to connect to your database and pull information from it, and you want relational logic to select the best matches
this is not a trivial exercise
'best match' is a very difficult logic to implement
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 27
Reputation: achiman is an unknown quantity at this point 
Solved Threads: 0
achiman achiman is offline Offline
Light Poster

Re: create a form with a post

 
0
  #7
Mar 9th, 2009
first of all i want to thank you for your reply so far but i have actually conneted to my mc access database and pulled all the information i need from it and have also created a form but it doesnt do the job for me. All i want for example is if a customer says they want a package btw 30 - 50 pounds i want if to display packages only btw that price. i have tried several if statements but they keep giving error.
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,365
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 164
almostbob's Avatar
almostbob almostbob is offline Offline
Nearly a Posting Virtuoso

Re: create a form with a post

 
0
  #8
Mar 9th, 2009
Now we're closer
and the fix is probably easy (not maybe for you and me but there are code gurus)
Post the wrong code in [code=language] tags, and 99% likely someone will be able to debug the error
if there is a result, the form is likely ok
if there are wrong results, the back end select function needs some tweaking
something like a wrong expression used to select $price < 50 $price > 30
Failure is not an option It's included free, you don't have to do anything to get it
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it

Please mark solved problems, solved
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 7
Reputation: jpcodechef is an unknown quantity at this point 
Solved Threads: 1
jpcodechef jpcodechef is offline Offline
Newbie Poster

Re: create a form with a post

 
0
  #9
Mar 10th, 2009
Try to connect Ms Access by this way,
http://www.configure-all.com/php_access.php

It will help you....
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 27
Reputation: achiman is an unknown quantity at this point 
Solved Threads: 0
achiman achiman is offline Offline
Light Poster

Re: create a form with a post

 
0
  #10
Mar 10th, 2009
Thanks everybody that helped me with this problem all i had to do was to insert some if and ifelse statements and let the page refer to itself. Thanks again
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC