Jump to content

Search the Community

Showing results for tags 'elseif'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 2 results

  1. This page explains how to use If...Then...ElseIf:http://www.w3schools.com/vbscript/vbscript_conditionals.asp>>You can use the If...Then...ElseIf statement if you want to select one of many blocks of code to execute:<< The code example shows ElseIF and the expression on the same line: >>ElseIf i = 11 Then<< but does not mention that this is required. You must either keep 'ElseIf' and the <expression> on the same line or use the line break/continuation character to split the line:ElseIf _ i = 11 Then Otherwise you will encounter a complier error.
  2. Hello everyone, I'm new to php so please bare with me on this. Before i explain my problem, let me give you guys a brief background on what i'm doing.i have a list of existing clients in my database that have a client# hence $code. Every clients will be sent an email that contain a link with their # aka $code. so when they arrive at my page, the address bar should also contain their $code.At the same time, there are also potential clients going to my webpage without client# ($code). Eventually both existing and potential clients will have to fill out a form. with their name and email. Problem #1:This is where I have difficulty in. Instead of making 2 separate website, which is very unnecessary. I want to set the form up according to those that enter the website with $code or without. Those with $code will be directed to request.php where they will fill in more information and those without will go to thankyou.php where the message "thank you for your request, a client id will be email to you shortly ." Unfortunately I can't get it to work, it only directs to thankyou.php with or without $code on the address bar. Please help me out. This is what I have on my index page. <?php $code=$_REQUEST['code'];$email=$_REQUEST['email'];?><html><head><title></title></head><body><form action="<?php if (isset($code)) echo 'request.php'; else echo 'thankyou.php'; ?>" method="post"> <input type="text" class="inputbg" name="FullName" id="FullName" onfocus="if (this.value == 'Your Name') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your Name';}" value="Your Name" /> <input type="text" class="inputbg" name="Email" id="Email" onfocus="if (this.value == 'Your Email') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Your Email';}" value="Your Email" /> <input type="hidden" name="Code" value="<?=$Code;?>" /> <input type="submit" class="submit" name="submit" value="<?php if (isset($code)) echo 'More Info'; else echo 'Continue';?>" /> </form> </body></html> Problem #2:I want to make the thankyou.php the result page where clients review their input for both sets of clients.Those with $code, I would want the page to show Name, email, phone, and appointment.For those without, I just want to show Name and email. This is what I have: <?php $FullName=$_REQUEST['FullName'];$Code=$_REQUEST['Code'];$Email=$_REQUEST['Email'];$Phone=$_REQUEST['Phone'];$BestTime=$_REQUEST['BestTime'];$theDate = isset($_REQUEST["date5"]) ? $_REQUEST["date5"] : "";$theDate = date('F-j-Y', strtotime($theDate));?><html><head><title></title></head><body><h1 class="heading" style="font-size:40px;">Thank you <?=$FullName;?> for your submission!</h1> <p style="padding:20px 0px 0px"> <h5>Your Email is: <?=$Email?>. </h5><?phpif (isset($code)) echo '[i]<h5>Your Personalized Code is: $Code. </h5>[/i][i]<h5> The phone number we had on file is $Phone</h5>[/i][i]<h5> You have scheduled a phone call on $theDate ,[/i][i]$BestTime -EST.</h5></p>[/i][i]<p style="color:#ffffff;"> *Selected appointment will adjust accordingly to Eastern Standard Time (-EST).</p>'[/i] [i]else[/i] echo "An email with a client I.D. will be email to you shortly."?> </body></html> I honestly thought the string if (isset($code)) ""; else ""; sting is all i need but no matter what, it only shows the second echo and never the first. I'm a little confuse at this point so if anybody out there knows how to fix this, please help me out. thank you! P.S. if anyone is confused by what i type, please let me know. Thank you.
×
×
  • Create New...