Okay, I am trying to create an application for work, we use Alert Finds to notify users in the company of outages across out network. We have to format these properly as they go out via text message as well as phone and they are read a certain way by the system. I am trying to write something that will take the users input for impact area, outage numbers, outage types, and if it's an open, update or close. My problem is the impact numbers. I don't know how to echo these IF they were supplied and they have to contain I. (for internet) or P. (for VoIP) and so on. Let me include what I have so far, I'm new to PHP and at a loss.
the format it needs to print is something like this.
O - I. P. Outage - Des Moines, IA - <description of outage>. Impact: 402 I. 200 P.
Here is my form (It's simple, for testing) alert.html
<html>
<body>
<form action="alertformat.php" method="post" name="alert">
Select Type:<br />
Open: <input name="open" type="radio" value="O" />
Update: <input name="update" type="radio" value="U" />
Close: <input name="close" type="radio" value="C" /><br />
<select name="outagetype" size="7">
<option value="I. Outage">I. Outage</option>
<option value="I. P. Outage">I. P. Outage</option>
<option value="I. P. V. Outage">I. P. V. Outage</option>
<option value="I. P. Ent. Outage">I. P. Ent. Outage</option>
<option value="I. Ent. Outage">I. Ent. Outage</option>
<option value="Tools Outage">Tools Outage</option>
<option value="Office Outage">Office Outage</option>
</select>
<br />
Impacted Tool, Office, or Location.<br />
<input name="iarea" type="text" value="" maxlength="100" /><br />
Description.<br />
<input name="description" type="text" value="" size="100" maxlength="255" /><br />
Impacts:<br />
I.<input name="icount" type="text" value="" maxlength="20" /><br />
P.<input name="pcount" type="text" value="" maxlength="20" /><br />
Ent.<input name="entcount" type="text" value="" maxlength="20" /><br />
V.<input name="vcount" type="text" value="" maxlength="20" /><br />
Other: <input name="other" type="text" value="" maxlength="100" /><br />
Office Count: <input name="ocount" type="text" value="" maxlength="20" /><br />
<input name="" type="submit" />
</form>
</body>
</html>
This is alertformat.php
<?php
$open = $_POST["open"];
$update = $_POST["update"];
$close = $_POST["close"];
$outagetype = $_POST["outagetype"];
$iarea = $_POST["iarea"];
$description = $_POST["description"];
$icount = $_POST["icount"];
$pcount = $_POST["pcount"];
$entcount = $_POST["entcount"];
$vcount = $_POST["vcount"];
$other = $_POST["other"];
$ocount = $_POST["ocount"];
$i = "I. " . $icount;
$p = "P. " . $pcount;
$e = "Ent. " . $entcount;
$v = "V. " . $vcount;
$o = "Office. " . $ocount;
echo "$open $update $close - $outagetype - $iarea - $description. Impact: t";
?>