PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
eshban
Forum Contributor
Posts: 184 Joined: Mon Sep 05, 2005 1:38 am
Post
by eshban » Wed Dec 20, 2006 1:30 am
Can i print SESSION VARIBLE through JAVASCRIPT ALERT
i use this code
Code: Select all
$_SESSION['abc'] = 'aaaa';
$rr = $_SESSION['abc'];
Code: Select all
<script>alert(<?php $rr;?>)</script>
But it does not display anything
Kieran Huggins
DevNet Master
Posts: 3635 Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:
Post
by Kieran Huggins » Wed Dec 20, 2006 1:41 am
print_r()
Maybe you should try a PHP tutorial somewhere. Anyone know of a good one?
Cheers,
Kieran
onion2k
Jedi Mod
Posts: 5263 Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com
Post
by onion2k » Wed Dec 20, 2006 2:27 am
eshban wrote: Code: Select all
<script>alert(<?php $rr;?>)</script>
But it does not display anything
It'd work if you had <?php
echo $rr;?> in there.