Jump to content

Why does this only work in IE, not Chrome/Firefox?


llamaultima

Recommended Posts

<?PHP

 

include("include/session.php");

?>

 

<html>

 

<head>

<title></title>

<style type="text/css">

.auto-style1 {

text-align: center;

}

.auto-style2 {

border: 2px solid #3366FF;

}

.auto-style3 {

font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;

}

</style>

</head>

 

<body style="background-color: #AAC6FF">

 

<?PHP

if(isset($_SESSION['useredit'])){

  unset($_SESSION['useredit']);

  echo "<h1><center>User Account Edit Success!</center></h1>";

  echo "<p><b><center>$session->username</b>, your account has been successfully updated. "

      ."<a href=\"javascript:window.close();\">Close Window</a>.</p></center>";

}else{

?>

 

<?PHP

if($session->logged_in){

?>

 

<h1 class="auto-style1"><span class="auto-style3">User Account Edit :</span> <? echo $session->username; ?></h1>

<?PHP

if($form->num_errors > 0){

  echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors." error(s) found</font></td>";

}

?>

<form action="process.php" method="POST">

<div align="center">

<table class="auto-style2" style="width: 300px">

<tr>

<td>Current Password:</td>

<td>

<input name="curpass" style="width: 150px" type="password" value="<? echo $form->value("curpass"); ?>"></td>

<td><? echo $form->error("curpass"); ?></td>

</tr>

<tr>

<td>New Password:</td>

<td>

<input name="newpass" style="width: 150px" type="password" value="<? echo $form->value("newpass"); ?>"></td>

<td><? echo $form->error("newpass"); ?></td>

</tr>

<tr>

<td>Current Email:</td>

<td><input name="email" style="width: 150px" type="text" value="<?

if($form->value("email") == ""){

  echo $session->userinfo['email'];

}else{

  echo $form->value("email");

}

?>"></td>

<td><? echo $form->error("email"); ?></td>

</tr>

<tr>

<td> </td>

<td>

<form method="post">

<input type="hidden" name="subedit" value="1">

<input name="submit" type="submit" value="submit"></form> </td>

</tr>

</table>

</div>

</form>

<?PHP

}

}

?>

</body>

</html>

Firstly, PHP executes on the server side so if your having issues with different browsers the problem is likely your markup, not your PHP.

 

Next, you haven't exactly given us much information, what exactly to you mean when you say it only works in.....

 

Thirdly, you seem to be referencing several objects without ever creating them. Where are $session and $form defined?

The form will only appear in IE, the page is just blank in Chrome/Firefox, and they're defined in a file called sessions.php

 

- Sorry for the lack of information, and lack of knowledge on posting here,  new user. First time post.

 

Thanks for the very fast reply.

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.