| svnipp 2005-09-15, 7:21 pm |
| I recently applied a template someone else in my team developed to a form page.
This is a simple login page that passes a single variable 'sbcuid' to itself.
The problem is that after applying the template to this page, the variable
does not get passed back to the page when the button is hit. The page is
simply reloading blank.
Thank in advance for any help. I have attached the code.
Scott
<?php
require_once('../prod.lib.php');
# This is the entry point to the New User Account Request system. The user
will provide their SBCUID which
# will then be used to query the Phone Database to return necessary
information to continue the request
# process.
session_start();
if ($sbcuid) {
echo "Inside the logged in statement.";
$connection = OCILogon("m21959", "m21959", "dal003.sbc.com") or die ("Unable
to logon to database.");
$query = "SELECT FIRST_NAME, LAST_NAME, SUPERVISOR_ID FROM web_phone_view
WHERE SBCUID='sn4265'";
$sql_statement = OCIParse($connection, $query) or die("Parse of statement
failed.");
OCIExecute($sql_statement) or die("Unable to execute statement.");
OCIFetchInto($sql_statement, $result) or die("Fetch failed.");
$tdid = $result[2];
$fname = $result[0];
$lname = $result[1];
$valid_user = $sbcuid;
$_SESSION['valid_user'] = $sbcuid;
if (isset($_SESSION['return_url'])) {
$link = $_SESSION['return_url'];
} else {
$link = '/NewUser/newuser.php';
}
header("Location: http://".$_SERVER['HTTP_HOST'].$link);
}
?>
<html><!-- InstanceBegin template="/Templates/euss.dwt"
codeOutsideHTMLIsLocked="false" -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>Enterprise Unix System Support Home</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../EUSS/euss.css" type="text/css">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script>
<style type="text/css">
<!--
.style2 {
color: #FFFFFF;
font-size: 10px;
}
.style3 {color: #FFFFFF}
.style4 {color: #FF0000}
.style5 {color: #000099}
a:link {
color: #990000;
}
a:visited {
color: #00FF66;
}
a:hover {
color: #339933;
}
a:active {
color: #FFFF33;
}
-->
</style>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.style3 {color: #000099}
.style4 {color: #000099; font-weight: bold; }
.style5 {font-size: 12px}
.style6 {font-size: 14pt}
.style8 {
font-size: 16px;
font-weight: bold;
}
.style10 {font-size: 16px; font-weight: bold; color: #000099; }
a:visited {
color: #009900;
}
a:hover {
color: #CC3399;
}
a:active {
color: #CC6600;
}
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"
marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('../images/button2_home.gif','../images/button1_customi
ze.gif','../images/button1_instructions.gif','../images/button2_customize.gif','
.../images/button2_instructions.gif','../PNGs/button2_rmticket.png','../PNGs/butt
on2_ticket_status.png','../PNGs/button2_user.png','../images/button2_contact.gif
')">
<table width="100%" border="0" cellspacing="0" cellpadding="0"
background="../images/header_bgd.jpg">
<tr>
<td width="300"><img src="../PNGs/euss_header.png" width="422"
height="54"></td>
<td width="100%" valign="top">
<div align="right"><a class="small" href="../EUSS/index.htm">home</a>
<a class="small" href="../EUSS/contact.htm">contact</a></div>
<div align="right">
</div>
</td>
<td width="35"><img src="../images/top_curve.jpg" width="35"
height="55"></td>
</tr>
</table>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="3" bgcolor="#000066" width="150" valign="top">
<p><img src="../images/clear_dot.gif" width="150" height="8"></p>
<p><a href="../EUSS/index.htm" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image18','','../PNGs/button2_home.png',1)"><img
name="Image18" border="0" src="../PNGs/button1_home.png" width="150"
height="25"></a><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image11','','../PNGs/button2_rmticket.png',1)"><img
src="../PNGs/button1_rmticket.png" name="Image11" width="150" height="25"
border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image12','','../PNGs/button2_ticket_status.png',1)"><
img src="../PNGs/button1_ticket_status.png" name="Image12" width="150"
height="25" border="0"></a><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image13','','../PNGs/button2_user.png',1)"><img
src="../PNGs/button1_user.png" name="Image13" width="150" height="25"
border="0"></a><br>
<a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image14','','../images/button2_contact.gif',1)"><img
src="../images/button1_contact.gif" name="Image14" width="150" height="25"
border="0"></a> </p>
<!-- #BeginEditable "left_column" -->
<table width="140" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td>
<p class="white"> </p>
</td>
</tr>
</table>
<!-- #EndEditable -->
<p align="center" class="style2"> Last Updated:<br>
<!-- #BeginDate format:fcAm1 -->Thursday, September 15, 2005<!--
#EndDate -->
</p>
<table width="140" border="0" cellspacing="0" cellpadding="0"
align="center">
<tr>
<td valign="top"><div align="center"><span class="style3">Questions
can be referred to<a href="mailto:mu3515@sbc.com"> Mike Urbanski </a></span>
</div>
<p align="center" class="style3"> </p>
</td>
</tr>
</table>
</td>
<td width="35" valign="top"><img src="../images/tl_curve.gif" width="35"
height="35"></td>
<td colspan="2"><!-- #BeginEditable "body" -->
<?php
if (isset($_SESSION['valid_user']) && $fname) { ?>
<font size="+1" color="#99CC00">Welcome <?php echo $fname; ?>! You are in
our world
now. Choose or DIE...</font></p><p align="center"><br>
<a href="newuser.php">New User Account Request Page </a></p><p
align="center"><br>
<a href="logout.php">Log out </a><br>
<?php
} else {
if (isset($sbcuid))
{
echo "Unable to log you in";
} else {
echo "<div align=\"center\"><h1 class=\"style3\">Please enter SBCUID for
this request.</h1></div>";
}
echo "<form method=post action=\"login.php\">";
echo "<div align=\"center\">";
echo "<table>";
echo "<tr><td><p align=\"justify\" class=\"style3\">SBC User ID:</p></td>";
echo "<td><input type=text name=sbcuid></td></tr>";
echo "<tr><td colspan=2 align=center>";
echo "<input type=submit value=\"Log in\"></td></tr>";
echo "</table></form>";
}
?>
<!-- #EndEditable --></td>
<td rowspan="3" width="35" valign="bottom"><img
src="../images/clear_dot.gif" width="35" height="1"></td>
</tr>
<tr>
<td width="35" height="379"> </td>
<td colspan="2"><!-- InstanceBeginEditable name="EditRegion1" -->
<h1 class="style5 style6"> </h1>
<p> </p>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td width="35" valign="bottom"><img src="../images/bl_curve.gif"
width="35" height="35"></td>
<td colspan="2"><div align="center">
<p><a class="small" href="../EUSS/index.htm">home</a> <a
class="small" href="../EUSS/rmticket">create ticket </a> <a
class="small" href="../EUSS/check_ticket.htm">check ticket </a> <a
class="small" href="../EUSS/contact.htm">contact</a> </p>
<p><span class="style3"><font face="Arial,Helvetica"><span
class="style5">Questions can be referred to <a
href="mailto:mu3515@sbc.com">M</a></span><span class="style4"><a
href="mailto:mu3515@sbc.com">ike Urbanski</a></span></font> </span></p>
</div></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0"
background="../images/footer_bgd.jpg">
<tr>
<td width="35"><img src="../images/clear_dot.gif" width="35"
height="8"></td>
<td width="100%" valign="top" align="right">
<p class="small"> </p>
</td>
<td><img src="../images/bottom_curve.jpg" width="35" height="55"></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
|