Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Change your <em>if</em> and <em>mail sending</em> statements into an <strong>if-elseif-else</strong> block</p> <pre><code>//validate sumbitted data if (empty($name)){ echo('&lt;p class="center"&gt;Please provide your name.&lt;/p&gt; &lt;form&gt;&lt;p class="center"&gt;&lt;input type="button" value="Go back" onClick="history.go(-1);return true;"&gt; &lt;/p&gt;&lt;/form&gt;'); } elseif (empty($email)){ echo('&lt;p class="center"&gt;Please provide your email.&lt;/p&gt; &lt;form&gt;&lt;p class="center"&gt;&lt;input type="button" value="Go back" onClick="history.go(-1);return true;"&gt; &lt;/p&gt;&lt;/form&gt;'); } //... other validation conditionals... //None of the above conditionals are true, send the message. else { $to = 'centercourtstringing@yahoo.com'; $from = 'centercourtstringing.com'; $subject = 'Contact from centercourtstringing.com'; $body = " Name: $name\r\n Email: $email\r\n Phone number: $phone\r\n Address: $address\r\n City: $city\r\n Retrieval method: $retrieval\r\n Needed by: $needed\r\n String type: $string\r\n Similar or upgrade OK: $outofstock\r\n Tension: $tension\r\n Unsure scale: $scale\r\n Extras: $extras\r\n Special requests or notes: $notes\r\n"; if(mail($to, $subject, $body, "From $from")){ echo '&lt;p&gt;Your pick-up has been requested. You should receive confirmation shortly via e-mail or phone. If you do not hear from us by the end of the day, please call Center Court Tennis Shop at 203-966-2543.&lt;/p&gt;&lt;p class="center"&gt;&lt;a href="http://centercourtstringing.com"&gt;Return to home page&lt;/a&gt;&lt;/p&gt;'; }else{ die('&lt;p&gt;Sorry, there was a mail delivery error. please call Center Court Tennis Shop at 203-966-2543 to schedule your pick-up.&lt;/p&gt;&lt;p class="center"&gt;&lt;a href="http://centercourtstringing.com"&gt;Return to home page&lt;/a&gt;&lt;/p&gt;'); } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload