I have the following:
<input type="hidden" name="phone_home" value="<? echo $_SESSION['full_home_phone'] ?>">
this works for firefox but not for google chrome.. can anyone help?
thx ahead of time
I have the following:
<input type="hidden" name="phone_home" value="<? echo $_SESSION['full_home_phone'] ?>">
this works for firefox but not for google chrome.. can anyone help?
thx ahead of time
Let me guess...
<input type="hidden" name="phone_home" value="<?
echo htmlspecialchars($_SESSION['full_home_phone'])
?>">
The problem could be that you are using <? ... ?>. Try <?php ... ?>.
Or you are not starting session before you are using $_SESSION.
Just to make sure the problem is not something very basic: you do understand that the session is tied to the browser, and changing to Chrome will mean you don't have the session data you stored in Firefox, right?
Depending on the doctype you use, this might be invalid HTML (no / at the end), and Chrome and Firefox handle tag soups differently. What is the actual HTML output? What do you see in Firebug / Chrome inspector?
This is the code you want:
<?=$_SESSION['full_home_phone'];?>
Also make sure that there are no quotes or apostrophes in your phone number, and not forgetting the semi-colon at the end :)
The following code is working for me in Chrome. I think the only problem there is (<?php) tag. Try this.
<?php
if (!isset($_SESSION)) session_start();
$_SESSION['var_name']='some value';
?>
<form action="post">
<input type="hidden" name="phone_home" value="<?php echo $_SESSION['var_name'] ?>">
</form>