[colug-432] PHP code question?
Vince Herried
Vince at PlanetVince.com
Sun Dec 20 18:34:41 EST 2015
I have a set of buttons for each letter of the alphabet
.
.
<a href="{_SERVER['PHP_SELF']}?_letterA">F</a>
<a href="{_SERVER['PHP_SELF']}?_letterB">G</a>
<a href="{_SERVER['PHP_SELF']}?_letterC">H</a>
.
.
I want to respond to the button press and set
$letter='A';
if some one presses the button for A, and
$letter='B';
if some one presses button for B, etc.
I would rather not write 26 if statements such as
if (isset($_GET['_letterA'])) {
$letter='A';
} else if ......
Is there a way to do this using regular expressions?
------------
Vince
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20151220/1374a57f/attachment.html
More information about the colug-432
mailing list