954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

create a form with a post

please can anyone tell me how i can create a form with check boxes and also a submit button using post.

achiman
Junior Poster in Training
51 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

You may want to have a look here -
http://www.daniweb.com/forums/thread159723.html

Bob Arctor
Newbie Poster
17 posts since Nov 2008
Reputation Points: 14
Solved Threads: 1
 

thanks for the link but im using ms access and not mysql. so please if you can help aspa

achiman
Junior Poster in Training
51 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

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

<?php
if($_POST){
echo 'submitted were';
foreach ($_POST as $key => $value) {
echo $key." value ".$value.'';} }
?>
<form action='<?php echo $_SERVER['php_self']; ?>' method='post'>
<input type='checkbox' value='yes' name='1'> checkbox 1
<input type='checkbox' value='yes' name='3'> checkbox 3
<input type='checkbox' value='yes' name='5'> checkbox 5
<input type='checkbox' value='yes' name='7'> checkbox 7
<input type='checkbox' value='yes' name='9'> checkbox 9
<input type='radio' value='yes' name='10'> Yes <input type='radio' value='no' name='10'> No
<button TYPE="submit" name="submit" value="submit" onclick="return(confirm('Are you sure, \nthis is such a trivial example'));">Submit</button>
</form>
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

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

achiman
Junior Poster in Training
51 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 
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

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

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.

achiman
Junior Poster in Training
51 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

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

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

Try to connect Ms Access by this way,
http://www.configure-all.com/php_access.php

It will help you....

jpcodechef
Newbie Poster
7 posts since Mar 2009
Reputation Points: 10
Solved Threads: 1
 

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

achiman
Junior Poster in Training
51 posts since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You