Jump to content

seaten

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

seaten's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I want the user to pick a font type, at the moment I have it in check boxes but I prefer to have it in a drop down list. But the key is to have each font option displayed in their own style. Any Ideas ? here is my current code: <b>Choose a Font Style for your Text:</b> <font face= arial>Arial</font>&nbsp; <input name="fontType" type="checkbox" id="sel_templateA" value="arial"> <font face="Bookman Old Style">Bookman Old Style&nbsp;</font> <input name="fontType" type="checkbox" id="sel_templateA" value="Bookman Old Style"> <font face="Comic Sans MS">Comic Sans&nbsp;</font> <input name="fontType" type="checkbox" id="sel_templateA" value="Comic Sans MS"> <font face="Courier">Courier&nbsp;</font> <input name="fontType" type="checkbox" id="sel_templateA" value="Courier">
  2. I want the user to pick a font type, at the moment I have it in check boxes but I prefer to have it in a drop down list. But the key is to have each font option displayed in their own style. Any Ideas ? here is my current code: <b>Choose a Font Style for your Text:</b> <font face= arial>Arial</font>&nbsp; <input name="fontType" type="checkbox" id="sel_templateA" value="arial"> <font face="Bookman Old Style">Bookman Old Style&nbsp;</font> <input name="fontType" type="checkbox" id="sel_templateA" value="Bookman Old Style"> <font face="Comic Sans MS">Comic Sans&nbsp;</font> <input name="fontType" type="checkbox" id="sel_templateA" value="Comic Sans MS"> <font face="Courier">Courier&nbsp;</font> <input name="fontType" type="checkbox" id="sel_templateA" value="Courier">
  3. Hi I'm pretty new to php, Okay what I'm trying to do is, after the user enters an invalid email address, I want him to re-enter the details for it. I know this sounds pretty simple, but I'm having difficulty with this. This is my code so far: //the user enters details <? session_start(); session_register('person_name'); session_register('person_email'); session_register('person_phoneno'); ?> <HTML> <BODY> <FORM method="post" ACTION="CheckWizard1.php"> Contact name:<input type="Text" name="sel_person_name" value=""><br> Contact email:<input type="Text" name="sel_person_email" value=""><br> Contact phoneno:<input type="Text" name="sel_person_phoneno" value=""><br> <input type="Submit" name="submit" value="Details"> </FORM> </BODY> </HTML> ---------------------------------------------------------------------------------------------------------- //Now I will check if the input is valid(in that case go to wizard2.php, if invalid go back to wizard1.php and re-enter details //This is code for CheckWizard1.php <? session_start(); ?> <HTML> <? if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$", $person_email)) { echo "$person_email is not a valid email"; //go back to wizard1, but I cannot put HTML link here <P>Please go to final Submit<a href="wizard1.php"> now </a>.</p> } ?> //else if everything is valid go post details to wizard2.php <FORM method="post" ACTION="wizard2.php"> Contact name:<input type="Text" name="sel_person_name" value=""><br> Contact email:<input type="Text" name="sel_person_email" value=""><br> Contact phoneno:<input type="Text" name="sel_person_phoneno" value=""><br> <input type="Submit" name="submit" value="Details"> </FORM>
  4. [!--quoteo(post=351046:date=Mar 2 2006, 01:47 PM:name=dcro2)--][div class=\'quotetop\']QUOTE(dcro2 @ Mar 2 2006, 01:47 PM) [snapback]351046[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi there, In order for PHP to parse (add the actual value of the var) you need double quotes around it: $theData = ereg_replace('<b>', "<b> $person_name", $theData); echo $theData; OR: $theData = ereg_replace('<b>', '<b> '.$person_name, $theData); echo $theData; [/quote] thanks a million
  5. Hi guys, I'm trying to replace a stringA with stringB(this has a variable in it) $theData = ereg_replace('<b>', '<b> $person_name', $theData); echo $theData; The problem is : '<b> $person_name' The value of $person_name is not displayed, so what do I need to add to display the value of the variabe ? Regards and thanks in advance
×
×
  • 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.