Jump to content

bukwus

Members
  • Posts

    44
  • Joined

  • Last visited

bukwus's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. bukwus

    Number formatting

    Awesome. Thank you.
  2. bukwus

    Number formatting

    More specifically, can I check to see if a number has commas and, if so, remove the commas?
  3. bukwus

    Number formatting

    HiRegarding the number_format() function, is there a way to check, perhaps with an "if else" statement, if the value of a variable which is a number string is formatted? Also, is there a function that strips a number's formatting?Thanks
  4. bukwus

    Form not working

    THANK YOU! Works like a charm.
  5. bukwus

    Form not working

    Hello I'm experimenting with PHP forms and am having trouble getting the form to recognize whether a field has been entered or not. I can't figure out where I'm going wrong. Here's the form, file name register_program.html: <?php$problem = $_SESSION['problem'];?><form id="regProg" action="verify.php" method="POST"> <?php if ($problem == 2) { echo '<p style="color:red;">Please fill in the form below</p>'; } elseIf ($problem == 1) { echo '<p>Thank you for filling in the form.</p>'; } ?> First Name: <input type="text" name="firstName" id="firstName" value="<?php echo $_SESSION['firstName']; ?>" size="40" maxlength="100" /><br /> <input type="submit" name="submit" value="Submit" /> <input type="submit" name="reset" value="Reset" /></form> And here's the PHP, file name verify.php: <?phpsession_start(); if (isset($_POST['reset'])) { session_destroy();}else { $_SESSION['firstName'] = $_POST['firstName']; if (isset($_POST['firstName'])) { $_SESSION['problem'] = 1; $to = "myemail@host.com"; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "Me"; $headers = "From:" . $_POST['firstName']; mail($to,$subject,$message,$headers); } else { $_SESSION['problem'] = 2; }} header('Location: register_program.html');?> Many thanks,Andy
  6. Thnaks for the reply.So I can use the code provided at these links such that, when a user fills out a form on my site and clicks submit, the processed form information will be sent to whatever email address I designate as 'to'?
  7. HelloI'm trying to learn how to send form information to an email address. I can't use the basic mailto method because it's not reliable or secure. I can build the form in HTML and process the info with PHP, I'm just stuck at the 'sending the info' stage. I've done some research online and the CGI tutorials I've looked into are a bit over my head.Can anyone help me out or point me to a resource (book, online, etc.) that can help me understand, at a basic level, the CGI involved with sending form information via email?Thanks
  8. Where can I find info on how to code a link so that it opens a new window, the dimensions of which I can control?For example, I'd like a user to click on a term and have its definition pop up or open in a new window that doesn't have all the tools and navigation at the top, just the window title and a closing X button.
  9. Thanks aspnetguy.I added the javascript and tweeked it for my purposes, but it wouldn't show up. Have my tweeks broken it?Here's what I added:<script type="text/javascript"> emailDAO=('name@' + 'host.' + 'com'); emailInfo=('name2@' + 'host.' + 'com'); document.write('<a href="mailto:' + emaiDAO + '">General Inquiries</a><br /> <a href="mailto:' + emaiInfo + '">Media Relations</a><br /> <a href="mailto:' + emaiDAO + '">Sponsor Relationships</a><br /> <a href="mailto:' + emaiDAO + '">Special Projects</a><br />'); </script>
  10. Tables are definately what we're headed for, but I just need a quick fix for the time being. Do you think my example would keep bots from reading the addresses?
  11. I asked in the HTML forum if there was a way to hide email addresses from spam bots. I got a good answer that uses JavaScript.I was wondering if the same kind of solution would work using PHP, seeing as JavaScript is browser side and PHP is server side.Here's the example:<?php $emailInfo ="info@" . "host." . "com"; print "<p><a href=\"mailto:" . $emailInfo . "\">General Inquiries</a></p>"; ?>Many thanks
  12. Thanks Scott.Do you know if PHP would work the same way or should I ask that on the PHP forum?Ex:<?php $emailInfo ="info@" . "host." . "com"; print "<p><a href=\"mailto:" . $emailInfo . "\">General Inquiries</a></p>"; ?>
  13. Hope this isn't redundant.How can I go about hiding email addresses in my HTML pages so that bots can't find them and send spam?Right now they are coded in the basic way:<a href="mailto:email@host.com" ect.In stead of using the email address as the linked text I've just used a name.Many thanks
  14. HiI'm new to the forum and I hope this is the right spot to post this particular question.I can't seem to get Firefox to center my content. I'm using a table with the align="center" attribute and it works fine in IE but not Ff. Here's the code:<body><table width="670" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td width="100%" border="0" colspan="2">Let me know if you need more of the code.Many thanksAndy
×
×
  • Create New...