Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 18th, 2007, 06:03 AM
Registered User
Join Date: May 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default If Else linking to HTML page

Hi there,

Using the following code:
if $mailsent($to, $subject, $message, $headers) {
//success page;


//error page;
How do i link to an HTML page using PHP. I have tried using Header ("Location: http//url") but it isn't working

However if i replace the URL link with a simple echo "success" it displays correctly.

Can anyone point me in the correct direction.
Many thanks.
Reply With Quote
  #2 (permalink)  
Old June 7th, 2007, 07:29 AM
Registered User
Join Date: Jun 2007
Location: , , Slovenia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to astarsi

I don't know if I really understand what would you like to do...I send the mail from an html page (using a form-redirecting on the php page) and the result(sent or failed) was displayed on a php page


   $subject = "Feedback from web site";
   $mailcontent = "test";
   $from = "sth@gmail.com";

mail($toaddress, $subject, $mailcontent, $from);
    $mailsent = @mail($toaddress, $subject, $mailcontent, $from);
echo $mailsent ? "Mail sent" : "Mail failed";


I hope this will help :)

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking to specific areas in a new page CathyM BOOK: Beginning ASP 3.0 2 August 2nd, 2005 09:23 AM
Linking opml/xml files to a html page helensobrien XML 0 February 21st, 2005 01:48 PM
Linking to the last accessed page mahulda ASP.NET 1.0 and 1.1 Basics 4 July 27th, 2004 12:49 AM
Page Linking though DropDown Lists mahulda ASP.NET 1.0 and 1.1 Basics 2 April 23rd, 2004 02:58 PM
How to create HTML page from a dynamic ASP page musharaf Classic ASP Professional 2 March 18th, 2004 09:31 PM

All times are GMT -4. The time now is 08:09 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.