|
-
November 18th, 2008, 12:59 PM
#1
PHP form
I am having a strange issue with this form built in PHP and html:
Code:
<form name="submit_call" id="submit_call" method="post" action="rpc/portal-submit-rpc.php" >
<?
if ($location == "CAR" OR $location == "BIZ" OR $location == "SPC") {
include("care_groups.php");
}
?>
<table width="580" class="bill">
<tr class="group"><td colspan="4">Zlinky Data Entry</td></tr>
<tr class="item odd">
<td>Account Number</td>
<td><input readonly = "readonly" id="cu_number" name="cu_number" value="<?php echo $Cuno;?>" /></td>
<td></td>
<td></td>
</tr>
<tr class="item even">
<td>State</td>
<td><select id="state" name="state" ><?php include("includes/states.inc"); ?></select></td>
<td>CRS Ticket (if any)</td>
<td><input type="text" id="abs_tkt" name="abs_tkt" size="10" value="<?php echo $Crs; ?>" /></td>
</tr>
<tr class="item odd">
<td>Issue</td>
<td><select name="issuemain" id="issuemain" ></select></td>
<td>Disposition</td>
<td><select name="issuesecond" id="issuesecond" ></select></td>
</tr>
<tr class="item even">
<td colspan="4"><textarea name="note" id="note" rows="8" cols="70" class="field" onKeyDown="limitText(this.form.note,this.value.length,255);"></textarea></td>
</tr>
<tr class="item odd">
<td colspan="4"> <input type="submit" id="submit" value="Submit" />
<input type="hidden" name="tech" id="tech" value="<?php echo $Webusr; ?>" />
</td></tr>
</table>
<p>Username: <?php echo $Webusr; ?></p>
</form>
So, what this SHOULD do is pass the information via POST to "rpc/portal-submit-rpc.php", which is a page that inserts the data into MySQL, and show a confirmation page that lists everything that was submitted or shows the MySQL error, if there is one.
Now, the $location variable is set depending on the department or location the tech is in. If this is set to "CAR", "BIZ", or "SPC" then they will have a set of radio buttons, which is brought in via:
include("care_groups.php");
here is the code for care_groups.php:
Code:
<div>
<input type="radio" name="function_group" value="resi" onclick="initListGroup('care_resi', document.submit_call.issuemain, document.submit_call.issuesecond);" />Residential
<input type="radio" name="function_group" value="biz" onclick="initListGroup('care_biz', document.submit_call.issuemain, document.submit_call.issuesecond);" />Business
<input type="radio" name="function_group" value="rss" onclick="initListGroup('care_ssresi', document.submit_call.issuemain, document.submit_call.issuesecond);" />Residential Special Services
<input type="radio" name="function_group" value="bss" onclick="initListGroup('care_ssbiz', document.submit_call.issuemain, document.submit_call.issuesecond);" />Business Special Services
<input type="radio" name="function_group" value="retention" onclick="initListGroup('retention', document.submit_call.issuemain, document.submit_call.issuesecond);" />Retention
</div>
The problem is this,
if the $location is NOT "CAR", "BIZ", or "SPC" this page works perfectly, and shows the confirmation page, and life is peachy.
if the $location IS "CAR", "BIZ", or "SPC" this page will reload and show the same default information. The odd thing is that the information still gets passed to the database, which means that
it must be sending the info to "rpc/portal-submit-rpc.php", but its just not showing that page (which should be the confirmation screen).
The only difference between the 2 is the group of radio buttons. And I have nothing on the page that would casue it to reload. I have no idea what is causing this problem.
Any help at all is appreciated. Thank you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|