Jump to content

[SOLVED] Page Problem


KaFF

Recommended Posts

Hi there,

 

This might be very simple but it has been driving me crazy for ages now. I have got a random S on my pagehttp://www.vtbilling.co.uk/editbillform.php?billno=1. If anyone can see from the code where this S is coming from i would greatly appreciate it.

 

<?php
/*session_start();
if((isset($_SESSION['userid'])==false) && ($_SESSION['secretaryid']=="")){
	header("Location: login.php");
	exit();
}*/
require "connect.php";
$billno = $_GET['billno'];
$query = "select * from bills where billno = ".$billno;
	$result = @mysql_query($query,$connection)
or die ("Unable to perform query<br>$query");
	$row = mysql_fetch_array($result)
?>
<head>
<style type="text/css">
<!--
a:link {
color: #FFFFFF;
}
a:visited {
color: #FFFFFF;
}
.style2 {
color: #CCCCCC;
}
-->
</style>
</head>
<body>

<div align="right"> <img src="logo_tagline.gif">
<br><br>
</div>
</head>

<table border="0" width="100%" height="38">
<tr>
<td width="85%" bgcolor="#336600">	
      <div align="left"><font color="#CCCCCC">
          <?=$_SESSION['username']?><?=$_SESSION['secname']?>  Logged In</font></div>
</td>
    <td width="15%" height="32" bgcolor="#336600">
<div align="center"><font color="#FFFFFF">
<?php
	$date=date("d-F-Y");
	echo $date; 
?>
</font>
</div>
</td>
</tr>
</table>
<table border="0" width="100%">
<tr>	
<td width="15%" bgcolor="#669900" valign="top">
  		<p> </p>
  		<p><br>
    	<?php
		if ($_SESSION['admin'] == "1") { ?>
    	</p>

	<p align="left">
	<a href="adduserform.php"><font color="#FFFFFF">Add User<BR></font></a>
	<a href="addsecretaryform.php"><font color="#FFFFFF">Add Secretary<BR></font></a>
	<a href="addbillform.php"><font color="#FFFFFF">Add Bill<BR><BR></font></a>
    <a href="users.php"><font color="#FFFFFF">View All Users<BR></font></a>
    <a href="secretary.php"><font color="#FFFFFF">View All Secretaries<BR></font></a>
    <a href="bills.php"><font color="#FFFFFF">View All Bills<BR><BR></font></a>
	<a href="updateuserform.php?userno=<?=$_SESSION['userno']?>"><font color="#FFFFFF">Update <?=$_SESSION['username']?> <BR><BR></font></a>
  	</p>

	<? }
	else {?>
	<p align="left"><a href="addbillform.php"><font color="#FFFFFF">Add Bill<BR><BR></font></a>
    <a href="bills.php"><font color="#FFFFFF">View All Bills<BR><BR></font></a>
	</p>
	<? }	
	?>

<td width="70%">
<form action="editbill.php" method="get">
<h1 align="left">Edit Bill</h1>
	<table width="248" border="0" align="center">
		<tr>
			<td>BillNo:</td>
			<td><input name="billno" readonly='readonly' type="text" value="<?=$row['billno']?>"></td>
		</tr>
		<tr>
			<td>UserID:</td>
			<td><input name="userid"type="text" value="<?=$row['userid']?>"></td>
		</tr>
		<tr>
			<td>SecretaryID:</td>
			<td><input name="secretaryid"type="text" value="<?=$row['secretaryid']?>"></td>
		</tr>
		<tr>
			<td>Addressee:</td>
			<td><input name="addressee"type="text" value="<?=$row['addressee']?>"></td>
		</tr>
		<tr>
			<td>Date:</td>
			<td><input name="date" type="text" value="<?=$row['date']?>"></td>	
		</tr>
		<tr>
			<td>Ref:</td>
			<td><input name="ref"type="text" value="<?=$row['ref']?>"></td>
		</tr>
		<tr>
			<td>Matter:</td>
			<td><input name="matter"type="text" value="<?=$row['matter']?>"></td>
		</tr>
		<tr>
			<td>Narrative:</td>
			<td><textarea name="narrative" rows="5" cols="45"><?=$row['narrative']?></textarea></td>
		</tr>
		<tr>
			<td>Costs:</td>
			<td><input name="costs"type="text" value="<?=$row['costs']?>"></td>
		</tr>
		<tr>
			<td>CostsVAT:</td>
			<td><input name="costsvat"type="text" value="<?=$row['costsvat']?>"></td>
		</tr>
		<tr>
			<td>DisbsCost:</td>
			<td><input name="disbscosts"type="text" value="<?=$row['disbscosts']?>"></td>
		</tr>
		<tr>
			<td>DisbsList:</td>
			<td><input name="disbslist"type="text" value="<?=$row['disbslist']?>"></td>
		</tr>
		<tr>
			<td>DisbsVAT:</td>
			<td><input name="disbsvat"type="text" value="<?=$row['disbsvat']?>"></td>
		</tr>
		<tr>
			<td>DisbsTOTAL:</td>
			<td><input name="disbstotal"type="text" value="<?=$row['disbstotal']?>"></td>
		</tr>
		<tr>
			<td>VAT Total:</td>
			<td><input name="vattotal"type="text" value="<?=$row['vattotal']?>"></td>
		</tr>
		</div>
    </table>
<TABLE BORDER="0" div align="center">
<TD>
<INPUT TYPE="button" VALUE="BACK" onClick="history.go(-1)">

<input name="Save" type="submit" value="Update">

</TD>
</TABLE>
</form>
</td>

<td width="15%" bgcolor="#669900">
</td>
<tr>
  <td bgcolor="#666666"> </td>
  <td bgcolor="#666666"> </td>
  <td bgcolor="#666666"><div align="center" title="Logout of Billing System"><a href="logout.php" onClick="return confirm('Are you sure you want to logout?');"><font color="#FFFFFF">LOGOUT</font></a></div></td>S
</table>
</tr>
</table>
</body>
</html>

 

Thanks KaFF

Link to comment
https://forums.phpfreaks.com/topic/47292-solved-page-problem/
Share on other sites

  <td bgcolor="#666666"><div align="center" title="Logout of Billing System"><a href="logout.php" onClick="return confirm('Are you sure you want to logout?');"><font color="#FFFFFF">LOGOUT</font></a></div></td>S

 

That is where you S is coming from change it to this:

 

  <td bgcolor="#666666"><div align="center" title="Logout of Billing System"><a href="logout.php" onClick="return confirm('Are you sure you want to logout?');"><font color="#FFFFFF">LOGOUT</font></a></div></td>

 

No more S...weird.

Link to comment
https://forums.phpfreaks.com/topic/47292-solved-page-problem/#findComment-230682
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.