Issue loading content into DIV with Jquery [closed] - php

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I'm out of ideas and have been searching for awhile now, so hopefully someone can point me in the right direction.
I have a select box that allows a user to select a specific value. Then try to load a page using the URL/value and keep receiving a blank page.
Assuming no value is passed, it works. I've used this page in the same way quite a number of times in the past so I'm not certain whats wrong. Also, it only seems to fail if specific URL parameters are passed. I remove a substantial amount of code outside of the problem area to make it a bit easier to read.
So
$('#sheetDiv').load('loaddates.php');
will work
and
$('#sheetDiv').load('loaddates.php?project_name=' + value);
will not
Code for main page is below:
<?php
session_start();
include('db.php');
if($_POST[submit]=="Submit")
{
mysql_query("INSERT INTO tblusers SET username='".$_POST[username]."',password='".$_POST[password]."',type='".$_POST[type]."'") or print mysql_error();
}
function make_star($x)
{
$s="";
for($i=1;$i<=strlen($x);$i++)
{
$s.="*";
}
return $s;
}
?>
<head>
<script language="javascript" src="jscript/jquery.js"></script>
<script type="text/javascript" src="jscript/facefiles/jquery-1.2.2.pack.js"></script>
<script type="text/javascript" src="jscript/ddaccordion.js"></script>
<script type="text/javascript" language="javascript" src="jscript/jmenu.js"></script>
<script language="javascript" src="jscript/user.js"></script>
<script language="javascript" src="jscript/common.js"></script>
<script type="text/javascript" src="calendarDateInput.js"></script>
<script language="javascript">
function selectProject() {
$('#selectProject').show();
$('#addProject').hide();
}
function selectDate() {
$('#addProject').hide();
$('#selectDate').show();
}
function pdelete(id)
{
if(confirm('Are sure to delete the data ?')==true)
{
$.ajax({
type: "GET",
url: "ajax.php",
data: "act=delete&tbl=timesheet"+"&id="+id,
success: function(result){
$(".error").html(result);
setTimeout('window.location.reload()',2000);
}
});
}
}
checked=false;
function checkedAll (myfrm) {
var aa= document.getElementById('frm');
if (checked == false)
{
checked = true
}
else
{
checked = false
}
for (var i =0; i < aa.elements.length; i++)
{
aa.elements[i].checked = checked;
}
}
function del()
{
var flag=false;
var pass ;
for(var i=0; i<document.frm.length; i++) //check for all checkboxes
{
if( document.frm.elements[i].type=="checkbox" && document.frm.elements[i].checked==true )
{
flag=true;
}
}
if(flag == true)
{
if(confirm("Do you sure to delete this?"))
{
return true;
}else
{ return false;
}
}
if( flag==false ) // if no checkbox selected
{
alert("Please select at least one checkbox to proceed.");
return false;
}
}
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
return false;
}
function loadUsers(id) {
if(id !=2) {
var value = $('#selectValue').val();
alert('loadates2.php?project_name=' + value);
$('#sheetDiv').load('loaddates.php?project_name=' + value);
}
else if(id == 2) {
var value = $('#f_new_age_date').val();
$('#sheetDiv').load('loaddates.php?project_date=' + value);
}
}
function addProject() {
$('#selectProject').hide();
$('#selectDate').hide();
$('#addProject').show();
}
</script>
<style>
.selectday{
border-right:#CBCBCB 1px solid;
border-left:#CBCBCB 1px solid;
border-bottom:#CBCBCB 1px solid;
border-top:#CBCBCB 1px solid;
color:#666;
font-weight:bold;
padding-left:5px;
padding-right:5px;
}
.selectedday{
border-right:#CBCBCB 1px solid;
border-left:#CBCBCB 1px solid;
border-bottom:#CBCBCB 1px solid;
border-top:#CBCBCB 1px solid;
color:#666;
padding-left:15px;
padding-right:15px;
padding-top:7px;
}
.sday
{
color:#f69929;
font-family:Arial;
font-size:24px;
font-weight:bold;
}
</style>
<link href="css/menu.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" media="all" href="images/calendar.css" title="win2k-cold-1">
<!-- main calendar program -->
<script type="text/javascript" src="images/calendar.js"></script>
<!-- language for the calendar -->
<script type="text/javascript" src="images/calendar-en.js"></script>
<!-- the following script defines the Calendar.setup helper function, which makes
adding a calendar a matter of 1 or 2 lines of code. -->
<script type="text/javascript" src="images/calendar-setup.js"></script>
</head>
<div id="newContainer">
<?php if($_SESSION[usertype] == "A" || $_SESSION[usertype] == "S" ) { ?>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<table width="100%" style="position:relative; left:15px;" border="0" cellspacing="0" cellpadding="0">
<?php include('header_project.php');?>
<tr>
<td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
<td> </td>
<td align="center"><div id="result" align="center" style="color:#FF0000; display:block;"> </div></td>
</tr>
<tr>
<td width="15%" height="395" align="left" valign="top" colspan="2"><? include('menu.php')?></td>
<td width="100%" valign="top">
< <div id="form_news" style="width:850px; position:relative;left:52px;">
<div id="options" style="margin-left: 350px;margin-top:130px;position:absolute;z-index:2">
Add New | Select Project
</div>
<div id="addProject" style="padding-top:15px; padding: 5px; display:none; height:500px; width:950px;position:relative; top:15px;">
<table width="100%" style="position:relative; left:25px" border="0" align="left" cellpadding="0" cellspacing="0">
<tr><td colspan="8">
<form name="ff1" method="post" action="time.php">
<table width="100%" border="0" align="left" cellpadding="5" cellspacing="3">
<tr align="left">
<tr>
<td width="86" align="left" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Project</span></td>
<td width="86" align="left" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Work Code</span></td>
<td width="90" bgcolor="#e1e1e1" ><span class="text_pt space">Employee Name</span></td>
<td width="44" bgcolor="#e1e1e1" ><span class="text_pt space"> Billable Hours</span></td>
<td width="147" bgcolor="#e1e1e1" ><span class="text_pt space">Notes</span></td>
<td bgcolor="#e1e1e1" ><span class="text_pt space">Date</span></td>
<td > </td>
</tr>
<tr align="left">
<td width="132" valign="top" class="f12b"><select name="project_number" id="project_name">
<option value="">Select</option>
<?php
$aa=mysql_query("select * from projects");
while($sql=mysql_fetch_array($aa))
{
?>
<option value="<?php echo $sql['project_number']?>" ><?php echo $sql['project_name']?></option>
<?php } ?>
</select></td>
<td width="127" valign="top" class="f12b"><select name="task" id="task">
<option value="">Select</option>
<?php
$aa=mysql_query("select * from work_codes");
while($sql=mysql_fetch_array($aa))
{
?>
<option value="<?php echo $sql['work_codes']?>"><?php echo $sql['work_codes']?></option>
<?php } ?>
</select> </td>
<td width="111" valign="top" class="login_fnt"><select name="staff_name" id="staff_name">
<option value="">Select</option>
<?php
$aa=mysql_query("select * from staff_members");
while($sql_clients=mysql_fetch_array($aa))
{
?>
<option value="<?php echo $sql_clients['staff_id']?>" ><?php echo $sql_clients['staff_name']?></option>
<?php } ?>
</select></td>
<td width="47" valign="top" class="f12b"><input type="text" name="bill_hours" id="bill_hours" value="" size="5" /></td>
<td width="136" valign="top" class="f12b"><textarea name="description" id="description" cols="20" rows="1"></textarea>
<input type="hidden" name="expense_date" value="<?php echo $currdate;?>" /> </td>
<td width="185" valign="top" class="f12b">
<?php
$currdate=date('Y-m-d');
?>
<input name="new_age_date" id="f_new_age_date" onChange="document.form_news.new_rem_age_date.value=document.form_news.new_age_date.value" size="10" readonly="yes" type="text" value="<?php echo $currdate;?>">
<img src="images/img.gif" id="trigger_new_age_date" style="cursor: pointer; border: medium none;" title="Select Date">
<script type="text/javascript">
Calendar.setup({
inputField : "f_new_age_date",
ifFormat : "%Y-%m-%d",
button : "trigger_new_age_date",
singleClick : true
});
</script> </td>
<td width="41" valign="top" class="f12b"> </td>
</tr>
<tr align="left">
<td valign="top"> </td>
<td valign="top" class="f12b"> </td>
<td valign="top" class="f12b"> </td>
<td valign="top" class="login_fnt"> </td>
<td valign="top" class="f12b"> </td>
<td valign="top" class="f12b"> </td>
<td valign="top" class="f12b"> </td>
</tr>
<tr align="left">
<td valign="top"> </td>
<td valign="top" class="f12b"> </td>
<td valign="top" class="f12b"> </td>
<td valign="top" class="login_fnt"> </td>
<td valign="top" class="f12b"> </td>
<td valign="top" class="f12b"></td>
<td valign="top" class="f12b"><input type="submit" name="submit" id="submit" value="Add Time" /></td>
</tr>
</table>
</form>
</td></tr>
</table>
</div>
<div id="selectProject" style="position:relative; z-index:1; padding-top:15px; padding: 5px; display:none; height:500px; width:950px; top:125px;">
<div style="position:relative;bottom:45px">
<p style="padding:5px padding-bottom:0px;margin-left:50px; "> Select a Project:<p>
<select id ="selectValue" style="margin-left:50px;position:relative;bottom:15px;width:150px;">
<?php
$aa1 = mysql_query("select * from projects");
while(#$sql=mysql_fetch_array($aa1)) {?>
<option value="<?php echo $sql[project_name]; ?>"><?php echo $sql[project_name]; ?> </option>
<?php } ?>
</select>
<input type="button" id="selectProjectSubmit" value="Submit" onclick="loadUsers()" style="position:relative;bottom:15px;"/>
</div>
<div id="sheetDiv" style="height:500px;width:950px; border: solid 1px red; position:relative; bottom:70px;"> random </div>
</div>
</td></tr>
</table>
</td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table></td>
</tr>
<?php }?>
</div>
*****Code for loaded div below:*******
<?php
session_start();
include('db.php');
?>
<head>
<script type="text/javascript">
function updateField(id, field, project_name, date) {
if(id) {
$field = $('#'+id);
$value = $field.val();
$.ajax({
type: "GET",
url: "ajax2.php",
data: "rqt=time&idfield=" + id + "&valuefield="+$value });
}
else {
$.ajax({
type: "GET",
url: "ajax2.php",
data: "rqt=updatetime&valuefield="+ field + "&date=" + date + "&project_name=" + project_name});
}
}
function doit(id,fieldtype, newvalue) {
if(fieldtype=="staff_name" || fieldtype=="task"){
var newvalue = newvalue.options[newvalue.selectedIndex].value;
}
$.ajax({
type: "GET",
url: "ajax2.php",
data: "fieldtype=" + fieldtype + "&id=" + id + "&newvalue=" + newvalue,
});
}
</script>
</head>
<?php if($_REQUEST[project_date]){
$currDate = date('Y-m-d', strtotime($_REQUEST[project_date]));
$dayOfWeek = date('N', strtotime($_REQUEST[project_date]));
if($dayOfWeek == 7) { $dayOfWeek = 0;}
$subtractTime = "-".(string)$dayOfWeek."days";
$newdate = strtotime($subtractTime , strtotime ($currDate) ) ;
$newdate = date ( 'Y-m-d' , $newdate );
$enddate = $newdate;
}
?>
<?php
if($_SESSION[usertype] == "E") { ?>
<table width="875px" style="position:relative; left:15px;" border="0" align="left" cellpadding="0" cellspacing="0">
<td colspan="8">
<table width="100%" border="0" align="left" cellpadding="5" cellspacing="3">
<tr>
<td width="100" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Project Name</span></td>
<td width="100" bgcolor="#e1e1e1" ><span class="text_pt space">Sunday</span></td>
<td width="100" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Monday</span></td>
<td width="100" align="left" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Tuesday</span></td>
<td width="100" align="left" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Wednesday</span></td>
<td width="100" bgcolor="#e1e1e1" ><span class="text_pt space">Thursday</span></td>
<td width="100" bgcolor="#e1e1e1" ><span class="text_pt space">Friday</span></td>
<td width="100" bgcolor="#e1e1e1" ><span class="text_pt space">Saturday</span></td>
</tr>
<?php
$totalhrs=0;
$Query_dbl=mysql_query("select * from projects");
while($dbl_=mysql_fetch_array($Query_dbl))
{
$counter = 0;
?> <?php
$secondCounter = 0;
$starting = true;
while($secondCounter != 7 ) {
$newdate = $enddate;
$newdate = strtotime("".$secondCounter."day" , strtotime($newdate));
$newdate = date("Y-m-d", $newdate);
$Query_fql=mysql_query("select * from timesheet where staff_name='".$_SESSION['staff_id']."' AND project_name='".$dbl_['project_name']."'");
if($secondCounter == 0 && mysql_num_rows($Query_fql) > 0 ) {
$PN_=mysql_fetch_array($Query_fql);
?>
<tr> <td> <?php echo $PN_['project_name']; ?>
</td>
<?php $starting = false;}
$Query_sql=mysql_query("select * from timesheet where staff_name='".$_SESSION['staff_id']."' AND project_name='".$dbl_['project_name']."' AND expense_date='".$newdate."'");
$Query_xql=mysql_query("select * from timesheet where staff_name='".$_SESSION['staff_id']."' AND project_name='".$dbl_['project_name']."' AND expense_date='".$newdate."'");
$secondCounter++;
if(mysql_num_rows($Query_xql) > 0) {
$currentDate = null;
while($sql_=mysql_fetch_array($Query_sql))
{
if($currentDate != $sql_['expense_date']){
$currentDate = $sql_['expense_date'];
$cyell = mysql_query("SELECT SUM(bill_hours) AS newhours FROM timesheet WHERE expense_date='".$sql_['expense_date']."' and project_name='".$sql_['project_name']."' and staff_name='".$_SESSION['staff_id']."'");
$cardyell=mysql_fetch_assoc($cyell);
}
else {
continue;
}
?>
<td align="left">
<select style="width:100px" name="billHours" id="<?php echo $sql_['id'] ?>" onchange="updateField(this.id)">
<?php $a = 0; while($a != 15) {?>
<option value="<?php echo $a; ?>" <?php if($sql_['bill_hours'] == $a) { echo "selected"; } ?>> <?php echo $a; ?> </option>
<?php $a = $a + .5;} ?>
</select>
</td>
<?php $totalhrs += $sql_['bill_hours']; } } else{ if($starting == false) { ?> <td>
<select style="width:100px" name="billHours" id="" onchange="updateField(null, this.value, <?php echo "'".$dbl_['project_name']."'";?>, <?php echo "'".$newdate."'";?>)">
<?php $a = 0; while($a != 15) {?>
<option value="<?php echo $a; ?>" <?php if($sql_['bill_hours'] == $a) { echo "selected"; } ?>> <?php echo $a; ?> </option>
<?php $a = $a + .5;} ?>
</select>
</td> <?php } } ?>
<?php } ?> </tr> <?php }
?>
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top"> </td>
<td align="left" valign="top" class="f12b"> </td>
<td colspan="2" align="right" valign="top" class="f12b"><br/><strong>Total Hours</strong></td>
<td align="center" valign="top" class="f12b">
<strong>
<?php
echo "<br/>";
echo $totalhrs;
?>
</strong></td>
<td align="left" valign="top" class="f12b"> </td>
</tr>
<tr>
<td colspan="7" align="left" valign="top"> </td>
</tr>
</table>
</td></tr>
</table>
</div>
<?php }
if($_SESSION[usertype] == "S" || $_SESSION[usertype] == "A"){ ?>
<table width="875px" style="position:relative;left:15px; bottom:0px !important" border="0" align="left" cellpadding="0" cellspacing="0">
<td colspan="8">
<table width="100%" border="0" align="left" cellpadding="5" cellspacing="3">
<tr>
<td width="20" class="login_fnt"><span class="text_pt space"> </span></td>
<td width="160" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Employee Name</span></td>
<td width="86" align="left" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Date Worked</span></td>
<td width="86" align="left" bgcolor="#e1e1e1" class="login_fnt"><span class="text_pt space">Billable Hours</span></td>
<td width="90" bgcolor="#e1e1e1" ><span class="text_pt space">Work Code</span></td>
<td width="44" bgcolor="#e1e1e1" ><span class="text_pt space">Notes</span></td>
</tr>
<?php
$Query_sql=mysql_query("select * from timesheet where project_name='".$_REQUEST['project_name']."'");
$totalhrs=0;
while($sql_=mysql_fetch_array($Query_sql))
{
?>
<tr>
<td width="20" align="left" valign="top">
<img src="redx.png" border="0" /></td>
<td width="90" align="left" valign="top" class="login_fnt"><select onchange="doit(<?php echo $sql_['id']?>, 'staff_name', this)" name="staff_name" id="staff_name">
<option value="">Select</option>
<?php
$aa=mysql_query("select * from staff_members");
while($sql_clients=mysql_fetch_array($aa))
{
?>
<option value="<?php echo $sql_clients['staff_id']?>" <?php if($sql_clients['staff_id']==$sql_['staff_name']) echo "selected";?>><?php echo $sql_clients['staff_name']?></option>
<?php } ?>
</select></td>
<td width="90" align="left" valign="top" class="login_fnt"> <input id="text" onblur="doit(<?php echo $sql_['id']?>, 'expense_date', this.value)" value="<?php echo $sql_['expense_date'];?>"/></td>
<td width="44" align="left" valign="top" class="f12b"><input type="text" onblur="doit(<?php echo $sql_['id']?>, 'bill_hours', this.value)" name="bill_hours" id="bill_hours" value="<?php echo $sql_['bill_hours']?>" size="5" />
<?php
$totalhrs=$totalhrs+$sql_['bill_hours'];
?>
</td>
<td width="86" align="left" valign="top" class="f12b"><select name="task" id="task" onchange="doit(<?php echo $sql_['id']?>, 'task', this)">
<option value="">Select</option>
<?php
$aa=mysql_query("select * from program_list");
while($sql=mysql_fetch_array($aa))
{
?>
<option value="<?php echo $sql['id']?>" <?php if($sql['id']==$sql_['task']) echo "selected";?>><?php echo $sql['sports']?></option>
<?php } ?>
</select> </td>
<td width="147" align="left" valign="top" class="f12b"><textarea name="description" onblur="doit(<?php echo $sql_['id']?>, 'description', this.value)" style="height:20px" id="description" cols="20" rows="1"><?php echo $sql_['description']?></textarea></td>
</tr><?php $i++; }
?>
<tr>
<td align="left" valign="top"> </td>
<td align="left" valign="top"> </td>
<td align="left" valign="top" class="f12b"> </td>
<td colspan="2" align="right" valign="top" class="f12b"><br/><strong>Total Hours</strong></td>
<td align="center" valign="top" class="f12b">
<strong>
<?php
echo "<br/>";
echo $totalhrs;
?>
</strong></td>
<td align="left" valign="top" class="f12b"> </td>
</tr>
<tr>
<td colspan="7" align="left" valign="top"> </td>
</tr>
</table>
</td></tr>
</table>
<?php } ?>

You may want to use a different approach to send parameters:
$("#sheetDiv").load("loaddates.php", { "project_name": value } );
That should do the job!

Related

Php calculation is posting as 0

I am having a problem with getting the calculation to post anything but 0. all other post has the correct info from the form but the calculation is not working. all the data that comes from the inputs and the calculation of the total pallets works. It is just the total price.
The whole form:
if(!checkAdmin()) {
header("Location: login.php");
exit();
}
$page_limit = 10;
// filter GET values
foreach($_GET as $key => $value) {
$get[$key] = filter($value);
}
foreach($_POST as $key => $value) {
$post[$key] = filter($value);
}
$rs_all = mysql_query("select count(*) as total_all from users") or die(mysql_error());
list($all) = mysql_fetch_row($rs_all);
?>
<?php
$rs_pickup = mysql_query("select count(*) as total_all from pickups") or die(mysql_error());
list($pickup) = mysql_fetch_row($rs_pickup);
?>
<?php
$sql="SELECT companyid, company FROM company ";
$result=mysql_query($sql) or die(mysql_error());
$options="";
while ($row=mysql_fetch_array($result)) {
$id=$row["companyid"];
$thing=$row["company"];
$options.="<OPTION VALUE=\"$id\">".$thing.'</option>';
}
?>
<?php
?>
<?php
$err = array();
if($_POST['doPickup'] == 'Enter Pickup')
if(empty($err)) {
$companyid = $_POST['companyid'];
$sql_grd = "SELECT companyid, grade_a_pu, grade_b_pu, grade_c_pu, ns_pu, custom_pu FROM company WHERE companyid = $companyid";
$result_grd=mysql_query($sql_grd) or die(mysql_error());
while ($row_grd=mysql_fetch_array($result_grd))
{
$price_a = $row_grd["grade_a_pu"];
$price_b = $row_grd["grade_b_pu"];
$price_c = $row_grd["grade_c_pu"];
$price_ns = $row_grd["ns_pu"];
$price_cus = $row_grd["custom_pu"];
}
$total_credit = (($_POST['grade_a_pal']*$price_a)+($_POST['grade_b_pal']*$price_b)+($_POST['grade_c_pal']*$price_c)+($_POST['ns_pal']*$price_ns)+($_POST['cus_pal']*$price_cus));
$sql_insert = "INSERT into `pickups`
(`companyid`,`pu_date`,`trail_num`,`grade_a_pal`,`grade_b_pal`,`grade_c_pal`,`ns_pal`,`cus_pal`,`pal_pu`,`credit`)
VALUES ('$_POST[companyid]','$_POST[pu_date]','$_POST[trail_num]','$_POST[grade_a_pal]','$_POST[grade_b_pal]','$_POST[grade_c_pal]','$_POST[ns_pal]','$_POST[cus_pal]','$_POST[pal_pu]','$total_credit')";
mysql_query($sql_insert,$link) or die("Insertion Failed:" . mysql_error());
}
?>
<html>
<head>
<title>USMI Pallets, Inc. :: Pickup Entry Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="styles.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"> </script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript">
$(document).ready( function() {
$("#datepicker").datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true
});
});
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php include("header.php"); ?>
<tr>
<td colspan="3" height="23" valign="top" style="background-color:#A42914 ">
</td>
</tr>
<?php include("admin_menu.php"); ?>
<td width="800" valign="top" style="padding: 10px;">
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="myaccount">
<tr>
<td>Total Pickups: <?php echo $pickup;?></td>
</tr>
</table>
<p><?php
if(!empty($msg)) {
echo $msg[0];
}
?></p>
<table width="80%" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color: #E4F8FA;padding: 2px 5px;border: 1px solid #CAE4FF;" >
<tr>
<td><form name="form1" method="get" action="pickup_ent.php">
<p align="center">Search Account:
<SELECT NAME=companyid id="q">
<OPTION VALUE=0>Choose
<?=$options?>
</SELECT>
<br>
</p>
<p align="center">
<input name="doSearch" type="submit" id="doSearch2" value="Search">
</p>
</form></td>
</tr>
</table>
<p>
<?php if ($get['doSearch'] == 'Search') {
$sql = "SELECT * FROM pickups WHERE companyid = '$_REQUEST[companyid]' ORDER BY pu_date DESC";
$rs_total = mysql_query($sql) or die(mysql_error());
$total = mysql_num_rows($rs_total);
if (!isset($_GET['page']) )
{ $start=0; } else
{ $start = ($_GET['page'] - 1) * $page_limit; }
$rs_results = mysql_query($sql . " limit $start,$page_limit") or die(mysql_error());
$total_pages = ceil($total/$page_limit);
?>
<?php
// outputting the pages
if ($total > $page_limit)
{
echo "<div><strong>Pages:</strong> ";
$i = 0;
while ($i < $page_limit)
{
$page_no = $i+1;
$qstr = ereg_replace("&page=[0-9]+","",$_SERVER['QUERY_STRING']);
echo "$page_no ";
$i++;
}
echo "</div>";
} ?>
<form name "searchform" action="pickup_ent.php" method="post">
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr bgcolor="#E6F3F9">
<td class="myheader">ID</td>
<td class="myheader">Company #</td>
<td class="myheader">Date</td>
<td class="myheader">Trailer Number</td>
<td class="myheader">Grade A</td>
<td class="myheader">Grade B</td>
<td class="myheader">Grade C</td>
<td class="myheader">Non-Std</td>
<td class="myheader">Custom</td>
<td class="myheader">Total Pickup</td>
<td class="myheader">Total Credit</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?php while ($rrows = mysql_fetch_array($rs_results)) {?>
<tr>
<td> <div align="center"><?php echo $rrows['pickup_id']; ?></div> </td>
<td> <div align="center"><?php echo $rrows['companyid']; ?></div></td>
<td> <div align="center"><?php echo $rrows['pu_date']; ?></div></td>
<td> <div align="center"><?php echo $rrows['trail_num'];?></div></td>
<td> <div align="center"><?php echo $rrows['grade_a_pal'];?></div></td>
<td> <div align="center"><?php echo $rrows['grade_b_pal'];?></div></td>
<td> <div align="center"><?php echo $rrows['grade_c_pal'];?></div></td>
<td> <div align="center"><?php echo $rrows['ns_pal'];?></div></td>
<td> <div align="center"><?php echo $rrows['cus_pal'];?></div></td>
<td> <div align="center"><?php echo $rrows['pal_pu'];?></div></td>
<td> <div align="center">$<?php echo $rrows['credit'];?></div></td>
<td width="10%">Edit Delete</td>
</tr>
<tr>
<?php } ?>
</table>
<p><br>
</form>
<?php } ?>
</p>
<h2><font color="#FF0000">Pickup Entry
Page</font></h2>
<p> </p>
<form name "pickupform" action="pickup_ent.php" method="post">
<table width="80%" border="0" align="center" cellpadding="10" cellspacing="0" style="background-color: #E4F8FA;padding: 2px 5px;border: 1px solid #CAE4FF;" >
<tr>
<td>
Account:
<SELECT NAME=companyid>
<OPTION VALUE=0>Choose
<?=$options?>
</SELECT> </td>
</tr>
<tr>
<td>Date: <input name="pu_date" type="text" id="datepicker" /></td>
</tr>
<tr>
<td>Trailer #:<select name="trail_num" id="trail_num">
<option selected value=""></option>
<option value="1986-1">1986-1</option>
<option value="1986-2">1986-2</option>
<option value="1986-3">1986-3</option>
<option value="1986-4">1986-4</option>
<option value="1986-5">1986-5</option>
<option value="1986-6">1986-6</option>
<option value="1986-7">1986-7</option>
<option value="1986-8">1986-8</option>
<option value="1986-9">1986-9</option>
<option value="1986-10">1986-10</option>
<option value="1986-11">1986-10</option>
<option value="1986-12">1986-12</option>
</select></td>
</tr>
<tr>
<td>Grade A Pallets: <input id="grade_a_pal" name="grade_a_pal" type="text" size="8"> </td>
</tr>
<tr>
<td>Grade B Pallets: <input id="grade_b_pal" name="grade_b_pal" type="text" size="8"> </td>
</tr>
<tr>
<td>Grade C Pallets: <input id="grade_c_pal" name="grade_c_pal" type="text" size="8"> </td>
</tr>
<tr>
<td>Non-Standard Pallets: <input id="ns_pal" name="ns_pal" type="text" size="8"></td>
</tr>
<tr>
<td>Custom Pallets: <input id="cus_pal" name="cus_pal" type="text" size="8"></td>
</tr>
<tr>
<tr>
<td>Total Pallets Picked Up:
<input id="pal_pu" name="pal_pu" type="text" size="8" readonly></td>
</tr>
<td><input name="doPickup" type="submit" id="doPickup" value="Enter Pickup"></p>
</td>
</tr>
</table>
<script>
$(document).ready(function() {
//this calculates values automatically
sum();
$("#grade_a_pal, #grade_b_pal, #grade_c_pal, #cus_pal").on("keydown keyup", function() {
sum();
});
});
function sum() {
var grade_a_pal = document.getElementById('grade_a_pal').value;
var grade_b_pal = document.getElementById('grade_b_pal').value;
var grade_c_pal = document.getElementById('grade_c_pal').value;
var ns_pal = document.getElementById('ns_pal').value;
var cus_pal = document.getElementById('cus_pal').value;
var result = parseInt(grade_a_pal) + parseInt(grade_b_pal) + parseInt(grade_c_pal) + parseInt(ns_pal) + parseInt(cus_pal);
if (!isNaN(result)) {
document.getElementById('pal_pu').value = result;
}
}
</script>
</form>
<p> </p>
<p> </p>
<p> </p></td>
<td width="12%"> </td>
</tr>
<tr>
<td colspan="3" height="43" valign="top" style="background-color:#A42914 ">
<table width="766" style="height:100% " border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="myfooter">
<div style="margin:12px 0px 0px 31px; ">
© 2012 USMI Pallets, Inc. All rights reserved
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
It appears you are using $_post (lower case) instead of $_POST (uppercase) for your pallets vars.
Try outputting a print_r($_POST) to see what you are getting in your $_POST array. It could just be you are referencing the wrong vars.

Syntax Error on my php script

I am getting this error message when run the code below. Below is the code that is giving me error messages. This is the error message
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\jq\fines\admin\portal.php on line 218
My code:
<body class="easyui-layout">
<div region="north" class="title" border="false" style="height:40px;">
Client Services Admin Portal
</div>
<div region="center" border="false">
<div id="pp" style="position:relative">
<div style="width:30%;">
<div title="Time" style="text-align:center;background:#f3eeaf;height:170px;padding:5px;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100" height="100">
<param name="movie" value="http://www.respectsoft.com/onlineclock/analog.swf">
<param name=quality value=high>
<param name="wmode" value="transparent">
<embed src="http://www.respectsoft.com/onlineclock/analog.swf" width="100" height="100" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>
</div>
<div title="Current Users Logged On" collapsible="true" closable="false" style="height:250px;padding:3px;">
<center>
<?php require_once "fines/admin/usersloggedon.php"; ?>
</center>
</div>
</div>
<div style="width:70%;">
<div title="Search for receipt" closable="false" style="height:170px;padding:10px;">
<center>
<form action="" method="post" id="receiptnumSearch">
<input type="hidden" name="check" value="submitted">
<input class="easyui-searchbox" style="width:200px" name="receiptnum" data-options="prompt:'',searcher:doReceiptSearch">
</form>
<br/>
<div style="background-color:#3FF; height:1px"> </div><br/>
<?php
require_once"functions.php";
if($_POST['check']=='submitted')//open1
{
//checking for errors
$receiptnum=trim($_POST['receiptnum']);
if($receiptnum=='')//open
{
//System error
echo SysError('Search field empty', 'index.php?t='.urlencode(base64_encode("admin_fins")).'&o='.md5(date('Y-m-d : t')).'');
die();
}//closed
elseif(!empty($receiptnum))//open
{
?><table class='tablestyle2' width=95% cellpadding=2 cellspacing=0>
<tr valign=top>
<td ><table width="100%" border="0" cellspacing="0" cellpadding="0" class='tablestyle_inner'>
<tr>
<td width="40%" class='tableheader' height="25">Paid From Library</td>
<td width="30%" class='tableheader'>Patron Name</td><td width="30%" class='tableheader'>Receipt Number</td>
</tr>
<?php
$db1w = new PDO('mysql:host=10.40.254.229;dbname=koha_msulibrary;charset=utf8', 'root', 'philly');
$gt_r=$db1w->query("SELECT * FROM fine, borrowers,branch_libs where borrowers.cardnumber=fine.cardnumber AND branch_libs.brunchid=fine.brunchid AND fine.receiptNum='$receiptnum' LIMIT 0,1");
$gt_r_results=$gt_r->fetch(PDO::FETCH_ASSOC);
echo'
<tr>
<td class=\'label\' height="25" align="center">'.$gt_r_results['branch_name'].'</td>
<td class=\'label\' align="center">'.ucwords(strtolower($gt_r_results['firstname'].' '.$gt_r_results['surname'])).'</td>
<td class=\'label\' align="center"><a target="_blank" href="http://www.msu.ac.zw/libraries/jq/fines/receipt.php?invoice='.base64_encode('invoce_view').'&t='.base64_encode($gt_r_results['receiptNum']).'">'.$gt_r_results['receiptNum'].'</a></td>
</tr>';
?>
</table></td></tr></table>
<?
}//closed
}//closed
?>
</center>
</div>
<div title="Library Fines Statistics" closable="false" style="height:250px;text-align:center;">
<center>
<br/><form action="" id="date_range" method="post"><table width="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="39%"><input type="hidden" name="date_r" value="date_r"><input name="data1" class="easyui-datebox" value="Start Date" width="200px"></input></td>
<td width="37%"><input name="data2" class="easyui-datebox" value="End Date" width="200px"></input></td>
<td width="24%">View Fines</td>
</tr>
</table></form>
<br/>
<?php
$data1=$_POST['data1'];
$data2=$_POST['data2'];
$date_r=$_POST['date_r'];
$dat=date('Y-m-d');
$da_1=strtotime($data1);
$data_=date('Y-m-d',$da_1);
//$da_2=strtotime($data2_);
//$data2=date('Y-m-d',$da_2);
//checking if date is real date
if((!isRealDate($data1) or !isRealDate($data2) or $dat < $data_ ) and $date_r=='date_r')
{
echo SysError('Incorrect date range', 'index.php?t='.urlencode(base64_encode("admin_fins")).'&o='.md5(date('Y-m-d : t')).'');
die();
}
//end of check
else{
?>
<table width=95% height="125" cellpadding=2 cellspacing=0 class='tablestyle2'>
<tr valign=top><td ><table width="100%" height="122" border="0" cellpadding="0" cellspacing="0" class='tablestyle_inner'> <tr> <td width="50%" class='tableheader' height="19">Branch Library</td> <td width="50%" class='tableheader'>
<?php
if($date_r=='date_r')
{
echo 'Fine collected between '.$data1.' and '.$data2;
}
else
{
echo 'Fines Collected to Date';
}
?></td>
</tr>
<tr>
<td class='label' height="12" >Batanai Library</td>
<td class='label' style="padding-left:10px">
<?php //checking if the date is real
if($date_r!='date_r')
{
echo GETbranchlibs('2');
}
elseif($date_r=='date_r')
{
echo GetBrunchLibsRange($data1,$data2,'2');
}
?></td>
</tr>
<tr>
<td class='label' height="6">GSBL</td>
<td class='label' style="padding-left:10px">
<?php
if($date_r!='date_r')
{
echo GETbranchlibs('3');
}
elseif($date_r=='date_r')
{
echo GetBrunchLibsRange($data1,$data2,'3');
}
?></td>
</tr>
<tr>
<td class='label' height="3" >Law Library</td>
<td class='label' style="padding-left:10px"><?php
if($date_r!='date_r')
{
echo GETbranchlibs('4');
}
elseif($date_r=='date_r')
{
echo GetBrunchLibsRange($data1,$data2,'4');
}
?></td>
</tr>
<tr>
<td class='label' height="3" >Main Library</td>
<td class='label' style="padding-left:10px"><?php
if($date_r!='date_r')
{
echo GETbranchlibs('1');
}
elseif($date_r=='date_r')
{
echo GetBrunchLibsRange($data1,$data2,1);
}
?></td>
</tr>
<tr>
<td class='label' height="2" >Total</td>
<td class='label' style="padding-left:10px; font-weight:bold;"><u><?php
if($date_r!='date_r')
{
echo GETbranchlibs('0');
}
elseif($date_r=='date_r')
{
echo GetBrunchLibsRange($data1,$data2,'0');
}
}
?></u></td>
</tr>
</table></td></tr></table></center>
</div>
</div>
</div>
</div>
You wrote somewhere in there
<? instead of <?php
So just change that and it will work. Tested on http://www.compileonline.com/execute_php_online.php

Print page setup in PHP

Am currently developing a web application which does the process of invoice etc.
Customer is using dot matrix printer to print invoice sheet. They said the requirement in printing as if there is more than 5 items in a sheet the rest should come as next sheet.
I have made that using PHP but i don't know how to print the next sheet in next page. It just prints as usual in sequence which results in a sheet printed in 2 pages. Any help or ideas will be appreciated. Below is the code how i generated sheet.
Thanks
<script type="text/javascript">
function printPage(){
var divElements = document.getElementById('printDataHolder').innerHTML;
var oldPage = document.body.innerHTML;
document.body.innerHTML="<link rel='stylesheet' href='css/common.css' type='text/css' /><body class='bodytext'>"+divElements+"</body>";
window.print();
document.body.innerHTML = oldPage;
}
</script>
<?php
$limit=5;
$cnt=0; // for table header and footer
$cnt2=1;// for no of rows count to print total values in end
$total=0;
?>
<div id="contentHolder" align="center">
<input type="button" value="Print" class="btnclass" onclick="printPage()" /> <input type="button" class="btnclass" value="Click to Proceed" style="width:100px;" onclick="Javascript:window.location.href='invoice.php';" />
<br />
<div id="printDataHolder">
<?php while($data=mysql_fetch_array($invcontents)){ ?>
<?php if($cnt==0){ ?>
<table width="800" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #4E9A91;">
<tr>
<td height="29" colspan="4" style="font-size:22px; padding-left:10px;"><strong>OvalTechnologies</strong></td>
</tr>
<tr>
<td colspan="4" style="padding-left:10px;"><?php echo($branchdetails['address']); ?></td>
</tr>
<tr>
<td height="19" colspan="4" style="padding-left:10px;">Website : www.ovaltechnologies.in Phone No : <?php echo($branchdetails['phoneno']); ?></td>
</tr>
<tr>
<td height="12" colspan="4" style="border-bottom:1px solid #4E9A91;"> </td>
</tr>
<tr>
<td height="28" colspan="3" style="padding-left:10px;">Customer Name : <?php echo($invtotal['customername']); ?></td>
<td width="226"> </td>
</tr>
<tr>
<td width="309" height="28" style="padding-left:10px;border-bottom:1px solid #4E9A91;">Invoice No : <?php echo($invoiceid); ?></td>
<td colspan="2" style="border-bottom:1px solid #4E9A91;">Paid As : <?php echo($invtotal['paidas']); ?></td>
<td style="border-bottom:1px solid #4E9A91;">Date : <?php echo(getonlydatefromdatetime(changefromdbdate($invtotal['invoicedate']))); ?></td>
</tr>
<tr>
<td height="28" class="rowborder" style="padding-left:10px;"><strong>Item Name</strong></td>
<td width="136" class="rowborder"><strong>Rate</strong></td>
<td width="129" class="rowborder"><strong>Qty</strong></td>
<td class="rowborder"><strong>Amount</strong></td>
</tr>
<?php } ?>
<tr>
<td align="center" height="28" style="padding-left:10px;"><?php echo($data['item']); ?> : <?php echo($data['brand']." "); ?><?php echo($data['type']); ?></td>
<td align="center"><?php echo($data['billedamount']); ?></td>
<td align="center"><?php echo($data['quantity']); ?></td>
<td align="center"><?php echo($data['billedamount']*$data['quantity']); ?></td>
</tr>
<?php
if($cnt2==$invcount){//printing emptylines to fill up page
for($i=$cnt+1;$i<$limit;$i++){
?>
<tr>
<td height="28" style="padding-left:10px;"> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<?php
}
}//printing emptylines to fill page ends
?>
<?php if($cnt==$limit-1 || $cnt2==$invcount){ ?>
<?php if($invtotal['transport']!="") {?>
<tr>
<td style="padding-left:10px; border-top:1px solid #4E9A91;" class="rowborder" height="28">Transport : <?php echo($invtotal['transport']); ?></td>
<td class="rowborder" style="border-top:1px solid #4E9A91;">Transport Cost : <?php echo($invtotal['transportcost']); ?></td>
<td class="rowborder" style="border-top:1px solid #4E9A91;">Destination : <?php echo($invtotal['destination']); ?></td>
<td class="rowborder" style="border-top:1px solid #4E9A91;"> </td>
</tr>
<?php } ?>
<tr>
<td height="28" class="rowborder" style="border-top:1px solid #4E9A91;"> </td>
<td class="rowborder" style="border-top:1px solid #4E9A91;"><?php if($invtotal['transport']!="") {if($invtotal['addtransport']=="no"){echo("Transport Cost Not Added");}}?></td>
<td class="rowborder" style="border-top:1px solid #4E9A91;">Total</td>
<td class="rowborder" style="border-top:1px solid #4E9A91;"><?php echo($invtotal['totalamount']);?></td>
</tr>
<tr>
<td height="28"> </td>
<td> </td>
<td> </td>
<td align="center">Invoice Done By</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table><br />
<?php } ?>
<?php
$cnt++;
$cnt2++;
if($cnt==$limit){
$cnt=0;
}
} ?>
</div>
</div>
<?php
} ?>
do not see such options in http://www.php.net/manual/en/function.printer-set-option.php
but you can have look around the functions here http://www.php.net/manual/en/ref.printer.php
printer_start_doc — Start a new document
printer_start_page — Start a new page

Pulling last years data from a table

Hello I'm trying to update this scholarship application box. However when the year changed to 2013 it only displays scholarship applicant info from 2013. I'd like it to display info from 2012. I tried messing around with the date but I cant seem to figure it out. Any help would be greatly appreciated!
<?php
$appYear = date("Y").'-'.(date("Y")+1);
$sql = 'select * from sApplication where studentID = "'.$database->iPrep($_SESSION['ID']).'" AND appYear = "'.$appYear.'" LIMIT 1';
$appID = Scholarship::iFindSQL($sql);
$total = count($appID);
if ($total > 0)
{
$app = array_shift($appID);
}
else
{
$app = 0;
}
?>
<li id="item-2">
<div id="appStatus">
<h3>Application Status</h3>
<blockquote>
<?php if ($app->submitted == ('0000-00-00') || !isset($app->submitted)) { ?>
<table style="border:1px solid #000;" width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="50%"><strong>Scholarship<br /> 2013-2014</strong></td>
<td width="50" align="right"> <a style="font-size:16px;" href="welcome.php? app=Scholar">Apply Now</a></td>
</tr>
<tr>
<td><strong>Date Submitted</strong></td>
<td align="right"> </td>
</tr>
<tr>
<td><strong>References</strong></td>
<td align="right"> </td>
</tr>
<tr>
<td><strong>Decision</strong></td>
<td> </td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
<tr>
<td><strong>Scholarship 2012-2013</strong></td>
<td> </td>
</tr>
<tr>
<td><strong>Decision</strong></td>
<td> </td>
</tr>
</table>
<?php } else { ?>
<table style="border:1px solid #000;" width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td width="90%"><strong>Scholarship 2013-2014</strong></td>
<td width="10%" align="right"> </td>
</tr>
<tr>
<td><strong>Date Submitted</strong></td>
<td align="right"><?=dbOutDate($app->submitted)?></td>
</tr>
<tr>
<td><strong>References</strong> </td>
<td align="right"></td>
</tr>
<tr>
<td colspan="2">
<?php
$refs = Reference::iFindSQL("Select * from reference where appID = '".$app->ID."'");?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php foreach($refs as $ref) { ?>
<tr> <td> <small><?php if($ref->rType == 'Academic Reference'){ echo 'Academic/Artistic/Professional'; } else { echo 'Community Service'; } ?></small></td> <td align="right"><?=$ref->status?></td></tr>
<?php } ?>
</table>
</td>
</tr>
<tr>
<td><strong>Decision</strong></td>
<td align="right">
<?php
if ($app->complete == 'Approved') { echo 'Approved'; }
if ($app->complete == 'Declined') { echo 'Declined'; }
if ($app->complete == 'Pending') { echo 'Pending'; }
if ($app->complete == 'Incomplete') { echo 'Incomplete'; }
Remove the WHERE clause that limits the year. Use ORDER BY to sort by year, descending.
$sql = 'select * from sApplication
where studentID = "'.$database->iPrep($_SESSION['ID']).
'" ORDER BY appYear DESC LIMIT 1';

PHP Form not working IE and Chrome, but fine in FF

<?
if(isset($_POST['accountUser']) && isset($_POST['accountPassword'])) {
include("dbase.php");
include("settings.php");
if ($_POST['accountType']=="member") {
$database="chatusers";
} else if ($_POST['accountType']=="model") {
$database="chatmodels";
} else if ($_POST['accountType']=="studioop") {
$database="chatoperators";
}
$userExists=false;
$result = mysql_query("SELECT id,user,password,status FROM $database WHERE status!='pending' AND status!='rejected' ");
while($row = mysql_fetch_array($result)) {
$tempUser=$row["user"];
$tempPass=$row["password"];
$tempId=$row["id"];
if ($_POST['accountUser']==$tempUser && md5($_POST['accountPassword'])==$tempPass) {
if ($row["status"]=="blocked") {
$userExists=true;
$errorMsg="Account is blocked, please contact the administrator for more details";
} else {
$userExists=true;
$currentTime=time();
mysql_query("UPDATE $database SET lastLogIn='$currentTime' WHERE id = '$tempId' LIMIT 1");
setcookie("usertype", $database, time()+3600);
setcookie("id", $tempId, time()+3600);
header("Location: cp/$database/");
}
}
}
if (!$userExists){
$errorMsg="Wrong Username or password";
}
} else if (isset($_GET['from']) && $_GET['from']=="recoverpass"){
$errorMsg="Your new password has been sent to your mail";
} else {
$errorMsg="Please complete username and password fields";
}
?>
<?
include("_main.header.php");
?>
<table width="720" height="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><form action="login.php" method="post" enctype="application/x-www-form-urlencoded" name="form1">
<p> </p>
<table width="720" border="0" align="center">
<tr>
<td colspan="2"><p align="left">
<span class="error"><?php if ( isset($errorMsg) && $errorMsg!=""){ echo $errorMsg; } ?></span>
<br>
<br>
</p></td>
</tr>
<tr>
<td width="210" align="right" valign="top" class="form_definitions"><div align="right">Username:</div></td>
<td align="left" valign="top"><input name="accountUser" type="text" id="accountUser" value="<? echo $_GET[user];?>" size="24" maxlength="24"></td>
</tr>
<tr>
<td align="right" valign="top" class="form_definitions"><div align="right">Password:</div></td>
<td align="left" valign="top"><input name="accountPassword" type="password" id="accountPassword2" size="24" maxlength="24"></td>
</tr>
<tr>
<td align="right" valign="top" class="form_definitions"><div align="right">Account type:</div></td>
<td align="left" valign="top">
<select name="accountType" id="select">
<option value="member" selected>Member</option>
<option value="model">Model</option>
<option value="studioop">Studio Operator</option>
</select> <div align="left"></div></td>
</tr>
<tr>
<td align="right" valign="top" class="form_definitions"> </td>
<td align="left" valign="top">
<input type="submit" name="Submit" value="Log In to your account"> <div align="left"></div></td>
</tr>
<tr>
<td align="right" valign="top" class="form_definitions"> </td>
<td align="left" valign="top">Lost Password? Press Here!</td>
</tr>
</table>
</form></td>
</tr>
</table>
<br>
<br>
<?
include("_main.footer.php");
?>
Sounds to me like you are missing a quote in the html you didn't post here.
Chrome fails on &nbsp in td cells.
<td align="right" valign="top" class="form_definitions"> </td>
Should just be
<td align="right" valign="top" class="form_definitions"></td>
This took me forever to figure out

Categories