qwave
-
Posts
6 -
Joined
-
Last visited
Never
Posts posted by qwave
-
-
Brilliant! Worked like a charm, thanks so much.
-
Does anyone know the answer to this? =/
-
I have a form on my website where the user registers his account, including email address. Once he submits the form, PHP executes the mail() function to send a confirmation email. However, if the user inputted an invalid address, the error message appears at the top of the page: "Warning: mail(): SMTP server response: 550 Invalid recipient: blahblah@fdshjfs.com in...."
I dont want the user to see this error message. I want to return a different error message and post it somewhere else on the page, such as "Invalid email address.". How can I make it so that mail() does not echo the error message to the immediete frame? -
Brilliant! That seems to have done the trick perfectly. Thanks a bunch!
-
My web form contains a list of valid subjects that user can 'enroll' in.
The database contains a table of subjects, and also a table of subjects that users have enrolled in.
I need a query that returns a list of subjects that the user has not enrolled in.
Subject table: subject_id, name
Subject_Enrolled table: enrollment_id, subject_id, user_id
So I have to return all names in the subject table unless the particular user already has an entry for the
subject in the subject_enrolled table. What is the best way to get the query that returns the names of
all the subjects that the user has not yet enrolled in?
Thanks in advance!
Grem
Multiple header() calls in a row, possible?
in PHP Coding Help
Posted
repeat
header( "Location: page(random number).html );
wait 10 seconds
end repeat
Basically I want to write a script that iterates over and over again, changing the browser window to a different page each time. Sort of like an automatic 'tour' of a website. What method should I use to accomplish this? Can the PHP script still run even after the page header has changed?
This doesnt seem to work:
header( "Location: blah1.html );
sleep( 5 );
header( "Location: blah2.html );
As only blah2.html page loads. For some reason, even though blah1.html is told to load first, the code completely skips it and moves to blah2.html instead after 5 seconds.
Thanks in advance!