Current location: Hot Scripts Forums » Programming Languages » PHP » check in database

check in database

Reply
  #1 (permalink)  
Old 07-09-09, 07:12 AM
jonnekke jonnekke is offline
Junior Code Guru
 
Join Date: Oct 2005
Location: holland!
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
check in database

Hi there..

I got a problem with this:

in my site I have several divs wich are "walked through" when a form is filled.

In div 1 I let the user select a data wich is provided from a MySql database.
If a data is booked it's not available

In the final step I want to check if the selected date is still available
(maybe someone was faster so it won't be available)

I can check this in php but then I need to reload the full page and all filled in items
in the form will be cleared.

I'm wondering if there is a way to check this and not reload the page OR do I need
to "transport" all variables to the check page?
and how do I transport a file that's allready selected for uploading?.

_j
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-09-09, 08:13 AM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 2,632
Thanks: 0
Thanked 15 Times in 15 Posts
I can think of a couple ways you can do this.

1. Possibly the easiest way would be to use Javascript's AJAX to send a request to a page that can query the database and check availability.

2. Submit the form to the final page and check availability then. You can always store the forms information in a session so the form can be re-populated if you have to go back. And a far as any files that have been uploaded, the saved files name can also be stored in the session so it can be deleted if the users change their mind.

I am sure there are several ways you can go once you understand what you can do.
__________________
Jerry Broughton
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit data - check for duplicate/delete duplicate from database Drbbest PHP 1 03-16-09 06:12 AM
Want to check in the database if the txn_id has been used before Oskare100 PHP 8 10-30-06 12:01 PM
Search for domain name in a Database with Spell check srik4u PHP 1 03-24-06 12:06 PM
Simple, searchable book database max fischer Script Requests 0 05-14-05 02:00 PM


All times are GMT -5. The time now is 09:12 PM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.