Click here to Skip to main content
15,888,026 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: Cloning a XLS worksheet in PHP Pin
Richard MacCutchan3-Jun-10 8:40
mveRichard MacCutchan3-Jun-10 8:40 
QuestionLearning Linux Pin
pc.bharti27-May-10 23:33
pc.bharti27-May-10 23:33 
AnswerRe: Learning Linux Pin
Richard MacCutchan28-May-10 0:10
mveRichard MacCutchan28-May-10 0:10 
GeneralRe: Learning Linux Pin
wbgxx21-Jun-10 3:58
wbgxx21-Jun-10 3:58 
AnswerRe: Learning Linux Pin
Iranian MM7-Sep-11 6:51
Iranian MM7-Sep-11 6:51 
QuestionPHP DOM Pin
vho12320-May-10 4:50
vho12320-May-10 4:50 
AnswerRe: PHP DOM Pin
Graham Breach20-May-10 7:06
Graham Breach20-May-10 7:06 
QuestionManaging a database insert failure.. Pin
MacIntyre19-May-10 4:57
MacIntyre19-May-10 4:57 
I am building a web membership site. when a new member signs up he is able the choose a username that will be used for tracking purposes, such as mike or chuck. The user name is the primary key in a MySql database. If there is already a 'chuck' in the system and a new user requests 'chuck' as a username the insert will fail, and that is OK. The php script catches the failure, the problem is that it puts an ugly message on the screen and break the process. I could change the message but that does not solve the problem.
What I want is a nice little dialog box that says that another name or name not available and redisplay the original signup screen?
This is my first php program (I've been writing code for more than 30 years). So I need to know how to return to the base application so the user and enter a different username.
Here is a code snippet of the error location where I would like to make the appropiate change:
if(!mysql_query('INSERT INTO `' . CC_FB_DB_TABLE . '` SET ' .
$query . "`created_at` = NOW()", $link))
{
printMessage('Unable to Insert Into Database Table.',
"We're sorry but we were unable to insert the form results " .
'into your database table. Please be sure that you have ' .
'the proper permissions to insert data into the ' .
CC_FB_DB_TABLE . ' table. If you are still experiencing ' .
'trouble, please contact your server administrator.');
}
*****************
Thanks for your assistance in advance...
Chuck
AnswerRe: Managing a database insert failure.. [modified] Pin
Dr.Walt Fair, PE19-May-10 5:26
professionalDr.Walt Fair, PE19-May-10 5:26 
GeneralRe: Managing a database insert failure.. Pin
MacIntyre19-May-10 5:39
MacIntyre19-May-10 5:39 
GeneralRe: Managing a database insert failure.. Pin
Dr.Walt Fair, PE19-May-10 6:02
professionalDr.Walt Fair, PE19-May-10 6:02 
GeneralRe: Managing a database insert failure.. Pin
MacIntyre19-May-10 6:32
MacIntyre19-May-10 6:32 
GeneralRe: Managing a database insert failure.. Pin
Dr.Walt Fair, PE19-May-10 6:53
professionalDr.Walt Fair, PE19-May-10 6:53 
GeneralRe: Managing a database insert failure.. Pin
MacIntyre19-May-10 7:53
MacIntyre19-May-10 7:53 
GeneralRe: Managing a database insert failure.. Pin
User 171649219-May-10 7:14
professionalUser 171649219-May-10 7:14 
GeneralRe: Managing a database insert failure.. Pin
MacIntyre19-May-10 7:54
MacIntyre19-May-10 7:54 
QuestionFile Conversion Pin
S p k 52117-May-10 18:44
S p k 52117-May-10 18:44 
Questionphp and batch files Pin
simpocoder17-May-10 3:13
simpocoder17-May-10 3:13 
AnswerRe: php and batch files Pin
User 171649217-May-10 3:22
professionalUser 171649217-May-10 3:22 
GeneralRe: php and batch files Pin
simpocoder17-May-10 4:10
simpocoder17-May-10 4:10 
GeneralRe: php and batch files Pin
cjoki17-May-10 11:43
cjoki17-May-10 11:43 
GeneralRe: php and batch files Pin
simpocoder18-May-10 22:53
simpocoder18-May-10 22:53 
GeneralRe: php and batch files Pin
cjoki1-Jun-10 14:19
cjoki1-Jun-10 14:19 
QuestionUsing SAX Pin
vho12317-May-10 2:17
vho12317-May-10 2:17 
Question">" problem in PHP code Pin
SNArruda15-May-10 6:09
SNArruda15-May-10 6:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.