Jump to content

bukwus

Members
  • Content Count

    44
  • Joined

  • Last visited

Community Reputation

0 Neutral

About bukwus

  • Rank
    Newbie
  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="f
  6. Never mind. I solved it with "overflow:hidden" in the footer DIV.
  7. I have a DIV that spans 100% across the screen with a specific background color. Inside is a nested DIV that confines the width and has auto margins. Inside that DIV I have two DIVs that are meant to float left and right, but when I float them it cancels the background color of the grandparent DIV. Any reason this is happening?Many thanks,Andy HTML <div id="footer"> <div id="containerFooter"> <div id="address"> Island Shakespeare Festival<br /> PO Box 1262<br /> Langly, Whidbey Island, WA 98260 </div> <div id="footerMenu"> <span><a hr
  8. HelloLet's say I wanted to generate a random number from 1 to 10. Then I want to do it again, only remove the previously generated number from the range. How would I go about this?Many thanks
  9. HiI'm using PHP to check if a form was filled out correctly, or at all. I have questions and three answers in the form of radio buttons.I'm using "if empty" to check if a question wasn't answered but it's not doing the trick: for ($i = 1; $i <= $numQuestions2; $i++) { if (empty($_POST['radio'.$i])) { $problem = TRUE; $dataSpan2[$i] = '<span style="color:red; font-weight:bold;">'.$questions2[$i].'</span>'; } else { $dataSpan2[$i] = $questions2[$i]; } } How should I be doing this?Many thanks
  10. HiI'm beginning a form that asks questions and has a drop down list of options to choose from. I'm going to use PHP to check for errors, loops to cut down on repetition, etc., but right now I'm just testing code at a basic level.Here's the PHP: if(isset($_POST['submit'])){ $value[1] = $_POST['choice1']; $value[2] = $_POST['choice2']; $value[3] = $_POST['choice3']; } else { $value[1] = 'Choose one...'; $value[2] = 'Choose one...'; $value[3] = 'Choose one...'; } Here's the basic form element: <select name="choice1"> <option value="0">'.$value[1].'</option> <option
  11. I'm probably misunderstanding you, but do you mean something like this? I tested it and it just returns the literal value of $email_body. Am I just doing it wrong?for ($i = 1; $i <= $numQuestions; $i++) { $email_body = '.$question['.$i.']."\n" .$_POST[\'data\''.$i.']."\n"'; }
  12. HiI've built a form so that the questions generate automatically. I set the number of questions into $numQuestions, I put the questions in an array called $questions, then used a typical for loop to create the questions in an HTML table. for ($i = 1; $i <= $numQuestions; $i++) { echo '<tr> <td align="left" valign="top" border="0"> <p>'.$questions[$i].'</p> <textarea rows="5" cols="53" id="data'.$i.'" name="data'.$i.'">'.$_POST['data'.$i].'</textarea> </td> </tr>'; } It works fine. The purpose of this is because I'm building
  13. Okay. Given that my checkboxes now look like this<input type="checkbox" name="category[]" value="Accounting" />and I've figured how to check if none are checked and how to carry over checked boxes, how do I now include the categories that were checked in the email that is sent as a result of correctly filling out the form?Here is the code that handles the content of the email. I've placed ??? in the place that I'm having trouble with: $to = 'email@company.org'; $email_subject = 'ExpertNet Aplicant'; $email_body = "Name:
  14. HiI'm using checkboxes in a form and have a few questions. Here is an example of the checkbox code in the HTML form: <input type="checkbox" name="category" value="Accounting" /> Accounting<br /><input type="checkbox" name="category" value="Administration" /> Administration<br /> The PHP file I wrote to handle the form data checks to see if required info was not included and displays the form again asking for the required info. Any info that was entered in the form is carried over:1. How do I check to see if none of the category boxes were checked?2. If a box is checke
  15. HiI've set my company's site up with Google Analytics and have a couple questions.My boss has been using Webalizer and AWStats as his analytics tools. These tools are counting an average of about 3000 visits/day. So far, Google has only counted around 400 visits/day. Would anyone happen to know how this could be?Secondly, we have pages on our site with links to sponsor sites. Is Google Analytics capable of counting when visitors click these links and which links are clicked?Many thanks.
×
×
  • Create New...