Jump to content

bbw82

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bbw82's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Same problem when using that code. I did not put this in the first post but its being displayed with echo command if that makes a difference
  2. I have a form where people enter in values and I need these values displayed in the proper format. I need the output string to have a "<" at the beginning and a ">" at the end but whenever I put the code in to add the < in the beginning nothing shows up. Here is my code. I am able to get it to work with just adding the > at the end but it seems when I add "<" to the beginning this is where nothing shows up. <?php $hairbald = trim($_POST['HairBald']); $eyes = trim($_POST['Eyes']); $test =$eyes.'.'.$hairbald; if(empty($test)) { $test = $test; } else $test = '<'.$test.'>'; ?> If the user selects blue eyes and bald head I need the output to be <blue.bald>
  3. I found a solution and am now using the following code $testgroup = implode('.',$_POST['TestGroup']); The issue I am having now is if there are no checkboxes selected in the form I get the following error Warning: implode() [function.implode]: Invalid arguments passed in /home/a5078204/public_html/process.php on line 6 Is there a way to keep it from giving a warning message if no checkboxes are selected?
  4. I have a form that has a section where you can pick multiple check boxes and when the info is returned to me it has the word Array at the end of it. There are 2 check boxes on the form one fo Steve and one for Ben Below is the code I am using in my PHP file foreach($_POST['TestGroup'] as $val) { echo $val . "\n"; } The output from the PHP code is----Steve Ben Array.------ How do I keep Array from coming up?
  5. I have a form where people will be putting in specific info such as their names and other info. When the form is posted I need to add a "." between the fields on the output depending on if it is filled out or not if field is blank do not need a "." Example if they put in their name Bob Marley on the form I need it to appear on the output as Bob.Marley. Here is the code using currently which also excludes blank fields echo $_POST["First"]; if(isset($_POST["Middle"])){ echo $_POST["Middle"]; } echo $_POST["Last"];
  6. I have a basicc form that takes users info and when they submit it it show on a new web page in the proper order. I need to know how do I skip a blank field. This form takes a users First, Middle, and Last name but many times they leave the middle name blank so I would want to skip this field from showing up when the form is posted. Here is what I have for the basic php script ..Would like to know how to skip a field if it is left blank on the form. echo $_POST["First"], print "."; ?><?php echo $_POST["Middle"], print "."; ?><?php echo $_POST["Last"], print "."; ?><?php echo $_POST["Persona1"], print ".";<br />
×
×
  • 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.