Advertisement

01.10.2006 at 08:39AM PST, ID: 21691040
[x]
Attachment Details

PHP Try Catch Question

Asked by TTinker5 in PHP and Databases

Tags: php, try, catch

Hi,

I'm inserting records into a mysql database through a form in php. Is it possible to catch an error thrown by the msql database and redisplay the form that is being submitted so the entered values are not lost?  I know I can check the values with javascript before the form is submitted, but I was wondering if this can be done with php and try catch blocks??  
I'm using mysql 5.0.16 and php 5.1.1

Thanks for your time.
Start Free Trial
[+][-]01.10.2006 at 12:30PM PST, ID: 15664699

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.12.2006 at 07:49AM PST, ID: 15682279

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01.13.2006 at 09:46AM PST, ID: 15693583

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: php, try, catch
Sign Up Now!
Solution Provided By: minnirok
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32