Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sending email with php

Featured Replies

Hello.

 

I am making a contact form for my Brothers website. I have been using a tutorial to make it and code it with php.

The problem I am having is testing it with xampp, plus I haven't a clue when it comes to php, I have a few problems that I would be very greatful if anyone could help me out.

 

Cheers

Stuey

post-41093-0-58863700-1375279259_thumb.jpg

post-41093-0-31872100-1375279275_thumb.jpg

post-41093-0-80110600-1375279284_thumb.jpg

  • Author

I fixed the port and password and it sent it. Lyndsey strikes again :D How can I re direct the message to another page?

  • Author

When I get the email there is nothing. Why isn't it sending me what is in the fields?

Looks like a syntax error on your $body variable declaration; £message should be $message

 

$body = "From: $name \n Email: $email \n Message: $message \n";

To redirect to another page once it's done, use the header function:

 

if(mail($to, $subject, $body, $headers)) {
  header('location: the_page.html');
} else { echo "oops, error!"; }

Hope this helps.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.