Jump to content

DeanWhitehouse

Members
  • Posts

    2,527
  • Joined

  • Last visited

Everything posted by DeanWhitehouse

  1. Show all the code, if what you say is line 38 then you haven't posted all the code
  2. You don't need to do <?php // Report all PHP errors error_reporting(E_ALL); // Same as error_reporting(E_ALL); ini_set('error_reporting', E_ALL); ?> They are both the same things you only need to use one Look at the tutorial link i posted, and learn PHP and fix the code. I have posted some modifications to show if there are any errors but there could be a number of things wrong, otherwise post in the freelance section asking for someone to write it for you.
  3. First off provide more info and don't have the title "Need a quick fix" we are here to help, but we do not profit from it so don't expect people to help you because you need a quick fix. Look at this and learn about headers for the mail function http://uk2.php.net/manual/en/function.mail.php Your code slightly improved <?php error_reporting(E_ALL); if(!empty($_REQUEST['attn']) && $_REQUEST['attn']=='signup') { $to="andy@clayarc.com"; $attn=$_REQUEST['attn']; $ip=getenv("REMOTE_ADDR"); $custtype=$_REQUEST['custtype']; $bizname=$_REQUEST['bizname']; $name=$_REQUEST['name']; $address=$_REQUEST['address']; $city=$_REQUEST['city']; $zip=$_REQUEST['zip']; $email=$_REQUEST['email']; $utility_name=$_REQUEST['utility_name']; $utility_number=$_REQUEST['utility_number']; $pod_number=$_REQUEST['pod_number']; $name_key=$_REQUEST['name_key']; $meterday=$_REQUEST['meterday']; $phone=$_REQUEST['phone']; $fax=$_REQUEST['fax']; $referral=$_REQUEST['referral']; $position=$_REQUEST['position']; $sig=$_REQUEST['sig']; $message = "From: $name ($email)\n Customer Type: $custtype \n Legal Company Name: $bizname \n Your Name: $name \n Street Address: $address \n City: $city \n Zip Code: $zip \n Email Address: $email \n Current Distribution Provider: $utility_name \n Account Number: $utility_number \n POD Number: $pod_number \n Name Key: $name_key \n Meter Read Date: $meterday \n Phone Number: $phone \n Fax Number: $fax \n Referred By: $referral \n Position: $position \n E-Signature: $sig \n Additional Info : IP = $ip \n "; $from = "From: $name ($email)\r\n"; if(mail($to=jlaperch@charter.net; $subject, $message, $from)) header("location:thanks.php"); else header("location:index.php"); } ?> You did write this code? If not then don't use it if you don't understand it. Here is a tutorial using php mail as a contact form http://djw-webdesign.awardspace.com/code.php?snippet=10
  4. try <?php if(isset($_POST['Submit'])) { $wood += (int) $_POST['select']; $cost_of_wood = 10; $amount_of_wood = $_POST['select']; $cost = $amount_of_wood * $cost_of_wood; if($cost > $gold) echo "Not enough gold"; else $gold = $gold - $cost; } else { $gold = 100; $wood = 0; } ?><style type="text/css"> <!-- .style1 { font-size: 18px; color: #FF0000; } --> </style> <p><span class="style1">YOU START OFF WITH 100 GOLD!</span></p> <p>GOLD: <?php echo $gold;?></p> <p>WOOD: <?php echo $wood;?></p> <p>BUY WOOD:</p> <p> <form id="form1" name="form1" method="post" action=""> <label> <select name="select" id="select"> <option value="10">10</option> <option value="20">20</option> <option value="30">30</option> </select> </label> </p> <label> <input type="submit" name="Submit" id="Submit" value="Submit" /> </label> </form> <p> </p> It would be better to use sessions to store the amount of wood and gold though
  5. You can't start sessions or send any headers after any HTML or whitespace.
  6. $questions[]= $data; That will put the var $data into the array $questions.
  7. Dude shut up, why tell someone to ignore errors/notices, they are important or they wouldn't be shown. Learn to correct all errors and notices to make your code better and to help prevent errors.
  8. Put session start before any HTML or whitespace. Your post field names are incorrect.
  9. You aren't checking if the form has even been posted or running any form validation, also your host might not allow you to send from emails that aren't registered with them. Please use code tags
  10. We are not reading through it checking it, run it if you get a problem ask us how to fix it.
  11. Posting the code isn't going to help :s
  12. Either use sessions, although not really advised, or use HTTP_REFERRER ,although not very accurate or hard code it, except the current page which u can use REQUEST_URI
  13. Is the url what you expect when redirected? Also what is in the if statement.
  14. PHP help forum, not javascript. and window.location should be document.location = "website.com"
  15. It is easier to read doing <?php function easier() { $easy = "This is easier to read than"; return $easy; } easier(); function harder(){ $harder = "Harder"; if($harder == "Harder"){ return $harder; } else{return false;} } ?>
  16. Don't be so lazy, we will help but not do the work for you.
  17. Try indenting your code next time, but the error is here die("Hubo un error en el query: " . mysql_error()) should be die("Hubo un error en el query: " . mysql_error());
  18. Fix these errors then re post here. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.thefanshop.ch%2Fbestellen.php&charset=%28detect+automatically%29&doctype=Inline&group=0
  19. In the statement use GROUP BY ORDER BY e.g. SELECT * FROM users GROUP BY dob ORDER BY dob DESC
×
×
  • 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.