Jump to content

ChrisBerry

New Members
  • Posts

    3
  • Joined

  • Last visited

ChrisBerry's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok, so i did this. <?php print_r($_POST); exit(); if ($_POST['submit'] == "Send") { ?> and the form vanished and i had this Array ( )
  2. <table width="50%"> <form action="<?php echo($PHP_SELF)?>" method="post" enctype="multipart/form-data" name="contactform" onSubmit="RGB_validateForm('name','','R','phone','','RisPhone','email','','RisEmail');return document.MM_returnValue"> <tr> <th scope="row">Name</th> <td><input name="name" type="text" id="name" size="32"></td> </tr> <tr> <th scope="row">Telephone</th> <td><input name="phone" type="text" id="phone" size="24"></td> </tr> <tr> <th scope="row">Email</th> <td><input name="email" type="text" id="email" size="32"></td> </tr> <tr> <th scope="row">Message</th> <td><textarea name="message" cols="48" rows="6" id="message"></textarea> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" id="Submit" value="Send"> <input type="reset" name="Reset" id="Reset" value="Reset"> </tr> </form> Does this mke any sense. I appologise, im not a php coder but a graphic designer, but many thanks for trying to help
  3. Hello you awesome coders. I am getting a strange mesage on this site and need some help if you can to fix. the site is showing this error Notice: Undefined index: Submit in E:\Domains\a\aet.uk.net\user\htdocs\contact.php on line 84 at this page; http://aet.uk.net/contact.php Can you help! the form wont post or work. cheers chris <?php include_once("photoman/common.php");?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php include("includes/header.php"); ?> <script language="JavaScript" type="text/javascript" src="<?php echo $pref ?>scripts/formcheck.js"></script> </head> <body> <?php include("includes/banner.php"); ?> <div id="content" class="<?php echo $sectname ?>"> <?php $pageimage = "includes/$sectname.swf"; if (file_exists($pageimage)) { ?> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0','width','789','height','197','title','<?php echo $sectname." page" ?>','src','includes/<?php echo $sectname ?>','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','includes/<?php echo $sectname ?>' ); //end AC code </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="789" height="197" title="<?php echo $sectname." page" ?>"> <param name="movie" value="includes/<?php echo $sectname ?>.swf" /> <param name="quality" value="high" /> <embed src="includes/<?php echo $sectname ?>.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed> </object></noscript> <?php } else { $pageimage = "includes/$sectname.jpg"; $pagemax = 250; if (file_exists($pageimage)) { list($sw, $sh, $type, $attr) = getimagesize($pageimage); printf("<div id='pagephoto'><img src=%s alt='%s' %s></div>", $pageimage, $sectname." page image", $attr ); } else { $pageimage = "includes/$sectname.gif"; if (file_exists($pageimage)) { list($sw, $sh, $typwe, $attr) = getimagesize($pageimage); printf("<div id='pagephoto'><img src=%s %s></div>", $pageimage, $attr); } } } ?> <?php $submenu = getMenuXML($sectname); if (count($submenu) > 0 ) { ?> <ul> <?php foreach ($submenu as $subitem) { $imagename = $subitem['image']; if ($imagename == "") { ?> <li><a href="<?php echo $pref ?><?php echo $subitem['href']; ?>"> <?php echo $subitem['name']; ?> </a> </li> <?php } else { ?> <li><a href="<?php echo $pref ?><?php echo $subitem['href']; ?>" onmouseover="MM_swapImage('<?php echo $imagename; ?>','','<?php echo $pref ?>images/<?php echo $subitem['rollover']; ?>',1)" onmouseout="MM_swapImgRestore()"> <img src="<?php echo $pref ?>images/<?php echo ($pagename == $sectname)?$subitem['rollover']:$subitem['image']; ?>" alt="<?php echo $subitem['name']; ?>" id="<?php echo $imagename; ?>" /> </a></li> <?php } } } ?> <div id="pagetext"> <?php $pagefile = "includes/$filename.htm"; if (file_exists($pagefile)) { $text = file_get_contents($pagefile); echo($text); } else { ?> <?php } ?> <?php if($_POST['Submit'] == "Send") { ?> <h2>Thank you for your interest1</h2> <p>We will contact you shortly.</p> <?php // send email $gall = new GalleryXML(); $mailsubj = "Enquiry from ".$gall->gettitle(); $mailto = $gall->getemail(); $mailhead = "From: ".$_POST['email']; $mailbody = "Enquiry from ".$gall->gettitle()."\n"; $mailbody = $mailbody."Name: \t".$_POST['name']."\n"; $mailbody = $mailbody."Phone: \t".$_POST['phone']."\n"; $mailbody = $mailbody."Email: \t".$_POST['email']."\n"; $mailbody = $mailbody."Message: \t".$_POST['message']."\n"; if ($debug) printf("Email message<br>To: %s<br>Subj: %s<br>Email body: %s<br> Header: %s<br>", $mailto, $mailsubj, $mailbody, $mailhead); mail($mailto, $mailsubj, $mailbody, $mailhead); } ?> <table width="50%"> <form action="<?php echo($PHP_SELF)?>" method="post" enctype="multipart/form-data" name="contactform" onSubmit="RGB_validateForm('name','','R','phone','','RisPhone','email','','RisEmail');return document.MM_returnValue"> <tr> <th scope="row">Name</th> <td><input name="name" type="text" id="name" size="32"></td> </tr> <tr> <th scope="row">Telephone</th> <td><input name="phone" type="text" id="phone" size="24"></td> </tr> <tr> <th scope="row">Email</th> <td><input name="email" type="text" id="email" size="32"></td> </tr> <tr> <th scope="row">Message</th> <td><textarea name="message" cols="48" rows="6" id="message"></textarea> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" id="Submit" value="Send"> <input type="reset" name="Reset" id="Reset" value="Reset"> </tr> </form> </table> </div> <?php include("includes/footer.php"); ?> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.