Page 1 of 1

frameset question

Posted: Sat Jun 08, 2002 1:15 pm
by elena
ok, i am trying to make a login page (new in this) which checks for the user name and pass in a table in oracle, and then if this is ok, takes you to a frameset....
<?php

$T1=$HTTP_POST_VARS['T1'];
$T2=$HTTP_POST_VARS['T2'];

putenv("ORACLE_SID=ACTDB");
putenv("ORACLE_HOME=C:/oracle/ora81");

$conn = ora_logon("scott@actdb", "tiger") or die(ora_error());
$curs1 = ora_open($conn);
$curs2 = ora_open($conn);

$query1 = "select members.alias, members.password
from members where members.alias=$T1 and members.password=$T2";

ora_parse($curs1, $query1);
ora_exec($curs1);
?>

<html>
<head>
</head>
<frameset cols="250,*" frameborder="NO" border="0" framespacing="0" rows="*">
<frame name="left" scrolling="NO" noresize src="left.php">
<frame name="main" src="featured.htm">
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>
</html>


question: how does the left php know the variables that this code knows (T1 and T2) how do i introduce them in the left.php?
thanks

Posted: Sat Jun 08, 2002 11:36 pm
by sam
<frame name="left" scrolling="NO" noresize src="left.php?T1=$T1&T2=$T2">

Cheers Sam :)

Posted: Sun Jun 09, 2002 7:37 am
by MattF
Not all browsers support this and you are assuming that register globals is on :P

Posted: Sun Jun 09, 2002 12:51 pm
by elena
ok, so that means that in my left.php i use the T1 as an already defined variable? and I don't need to introduce it with the post_vars? if I just write somewhere in the code T1 it will know what I'm talking about????
thanks:)
elena

Posted: Sun Jun 09, 2002 2:06 pm
by MattF
that depends on which version of PHP, if it is a newer one then you may need to use $_GET['T1']

Posted: Sun Jun 09, 2002 2:43 pm
by sam
MattF wrote:Not all browsers support this and you are assuming that register globals is on :P
Not all browsers support what? Passing links to frames with data in the name?

Cheers Sam