TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 219
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 130
  • Total: 130

Form Code Issue

Started by TolerancE, July 21, 2007, 12:43:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TolerancE

I have modified this code to fit what info I need submitted, yet when I test it and send it does work, but the thank you page changes the actual theme. I use Mesh, and when the form info is submitted, the thank you screen changes everything to the default theme. Can anyone look at the code and tell me what I'm doing wrong?


Quoteglobal $scripturl;

$youremail = 'tolerance@theringsidevoice.com'; // Enter your email address here
$emailtitle = 'PWSmarks Contract';

  $str = getenv("QUERY_STRING");
  if ($str)
    $action = 'index.php?'.$str;
  else
    $action = 'index.php';


if (isset($_POST['submit']))
{
  $message='';
  isset($_POST['name']) ? $name = $_POST['name'] : $name = '';
  isset($_POST['height']) ? $height = $_POST['height'] : $height = '';
  isset($_POST['weight']) ? $weight = $_POST['weight'] : $weight = '';
  isset($_POST['hometown']) ? $hometown = $_POST['hometown'] : $hometown = '';
  isset($_POST['orientation']) ? $orientation = $_POST['orientation'] : $orientation = '';
  isset($_POST['finishing']) ? $finishing = $_POST['phone'] : $finishing = '';
  isset($_POST['pic']) ? $pic = $_POST['pic'] : $pic = '';
  isset($_POST['theme']) ? $theme = $_POST['theme'] : $theme = '';
  isset($_POST['email']) ? $email = $_POST['email'] : $email = '';

  $text = "Superstars Name = $name \n Height = $height \n Weight = $weight \n Hometown = $hometown \n Orientation = $orientation \n Finishing Move = $finishing \n Picture = $pic \n Theme Song = $theme \n Email = $email";
  mail( $youremail, $emailtitle, $text);
  echo 'Thank you';
}

else
{
  // You'll want to make the form prettier
  echo '<form method="post" action="' . $action . '">';
  echo '<table>';
  echo '<tr><td>Superstars Name:</td></tr><tr><td><input type="text" name="name" /></td></tr>';
  echo '<tr><td>Height:</td></tr><tr><td><input type="text" name="height" /></td></tr>';
  echo '<tr><td>Weight:</td></tr><tr><td><input type="text" name="weight" /></td></tr>';
  echo '<tr><td>Hometown:</td></tr><tr><td><input type="text" name="hometown" /></td></tr>';
  echo '<tr><td>Orientation (Heel/Face/Tweener):</td></tr><tr><td><input type="text" name="orientation" /></td></tr>';
  echo '<tr><td>Finishing Move:</td></tr><tr><td><input type="text" name="finishing" /></td></tr>';
  echo '<tr><td>Picture (Link):</td></tr><tr><td><input type="text" name="pic" /></td></tr>';
  echo '<tr><td>Theme Song:</td></tr><tr><td><input type="text" name="theme" /></td></tr>';
  echo '<tr><td>Email:</td></tr><tr><td><input type="text" name="email" /></td></tr>';
  // add whatever other fields you want for your form
  echo '<tr><td align="center"><input type="submit" name="submit" value="Send"></td></tr>';
  echo '</table>';
  echo '</form>';
}

IchBin

In your article options is it set to display a specific theme?

TolerancE

#2
Yes it is. It is set as Mesh, but still goes over to default. But after looking closely, when I try it as a guest it is fine, but when I'm logged in it jumps to default....



This website is proudly hosted on Crocweb Cloud Website Hosting.