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.

Contact Form Issue

Featured Replies

Hi Guys

 

I'm having troubles with Two things on my Online ePortfolio:

 

1) I can not figure out how to center my contact form.

2) The contact form isn't working.

 

Here is the PHP Code for the form:

 

<?php

$mailto = 'u0863932@hud.ac.uk';
$subject = "JK Online";
$formurl = "http://www.ciwan.info/contact.html";
$errorurl = "http://www.ciwan.info/error.html";
$thankyouurl = "http://www.ciwan.info/thankyou.html";

// -------------------- END OF CONFIGURABLE SECTION ---------------

$name = $_POST['name'] ;
$email = $_POST['email'] ;
$subject = $_POST['subject'] ;
$comments = $_POST['comments'] ;
$spam=$_POST['spam'] ;
$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($subject) || empty($comments) || $spam!="56728") {
  header( "Location: $errorurl" );
  exit ;
}
$name = strtok( $name, "\r\n" );
$email = strtok( $email, "\r\n" );
$subject = strtok( $subject, "\r\n" );
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}

$messageproper ="---------- Crazyleafdesign.com message ----------\n\n" . "\nSent by : " . $name . "\nEmail : " . $email . "\nSubject : " . $subject . "\n\n\nMessage : " . $comments;

mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\r\nReply-To: \"$name\" <$email>\r\nX-Mailer: chfeedback.php 2.04" );
header( "Location: $thankyouurl" );
exit ;

?>

 

I would greatly appreciate any help.

 

Thank You.

Make sure that there is nothing before the <?php in the file contact.php since that is causing the header issue. By the looks of it you have HTML before it for some bizarre reason

as for the centering issue add

margin: auto;

to your #contact in your css

  • Author

Two more things hehe

 

1) How do I make the border follow around the two legends.

2) Leave fields white when hover and clicked.

 

Thanks :blush1:

  • Author

Should I create a topic in the CSS section ?

  • Author

It's alright mate :)

 

Thanks so much :)

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.