| ★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/002273.html | Nouvelle recherche | Portail wanayoo |
|
|
DevShed Discussion Forums
![]() PHP
![]() How do I passed values (variables) from one phtml file to another?
|
| next newest topic | next oldest topic |
| Author | Topic: How do I passed values (variables) from one phtml file to another? |
|
Eowyn Junior Member |
Included here is my source code : First File : Display_Book.phtml <HTML> <HEAD> <TITLE>Book Search Input Screen</TITLE>
$link = mysql_pconnect("db.ubuyibuy.com","it","it") or die("Unable to connect to SQL server"); ?>
<BODY bgcolor="#87CEFA"> <BR><BR><FONT SIZE="10"><FONT COLOR="#00688B"><strong>Book Search Input Screen</strong></FONT></FONT></H1> <BR><BR><FONT SIZE="8"><FONT COLOR="#1E90FF"><strong>Enter choice of Search Mode :</strong></FONT></FONT> <BR><BR><FONT SIZE="6"><FONT COLOR="#1E90FF"><strong>1 For ISBN.</strong></FONT></FONT> <BR><FONT SIZE="6"><FONT COLOR="#1E90FF"><strong>2 For Title.</strong></FONT></FONT> <BR><FONT SIZE="6"><FONT COLOR="#1E90FF"><strong>3 For Subject.</strong></FONT></FONT> <BR><FONT SIZE="6"><FONT COLOR="#1E90FF"><strong>4 For Author.</strong></FONT></FONT> <BR><FONT SIZE="6"><FONT COLOR="#1E90FF"><strong>5 For Book Store.</strong></FONT></FONT> <P> <BR><BR><input type="text" size "3" name="choice"> </P>
<INPUT type="submit" name="Display_Results" value="View List" onClick="window.open('http://dev.ubuyibuy.com/johnny/book/Book_Results.phtml','Book_Results','width=800,height=800','srollbars=yes','resizable=yes')"> </P>
<BR><A HREF="mailto:elaine_voon@yahoo.co.uk"><P><FONT SIZE="+2"><FONT COLOR="#228B22">Contact us via e-mail</FONT></FONT></P></A> </P> </BODY> </FORM>
<HTML> <HEAD> <BODY> <FORM> <H1><FONT COLOR="#00688B">Results from Book Search</FONT></H1>
$link = mysql_pconnect("db.ubuyibuy.com","it","it") or die("Unable to connect to SQL server");
$result=mysql_query($SQL_STATEMENT,$link) or die("Select Failed!");
$result=mysql_query($SQL_STATEMENT,$link) or die("Select Failed!");
$result=mysql_query($SQL_STATEMENT,$link) or die("Select Failed!");
$result=mysql_query($SQL_STATEMENT,$link)or die("Select Failed!");
} if (mysql_query($SQL_STATEMENT)) if (!$result)
$ISBN = $row[0]; $err = mysql_error(); If ($err)
} ?>
Below is the e-mail link, for testing purposes, I have inserted my e-mail address here, --> <BR><A HREF="mailto:elaine_voon@yahoo.co.uk"><P><FONT SIZE="+2"><FONT COLOR="#228B22">Contact us via e-mail</FONT></FONT></P></A>
</FORM> </HTML> |
|
Shiju Rajan Member |
Eowyn, Your question is not clear.. what you are trying to do with both the files.. you should re-write the both the scripts.
<HEAD> <TITLE>Book Search Input Screen</TITLE>
$link = mysql_pconnect("db.ubuyibuy.com","it","it") or die("Unable to connect to SQL server"); ?>
<BODY bgcolor="#87CEFA"> see here you are using two body tags and two form tags...i don't know why you are using that.. it can be.. <HTML> <BODY bgcolor="#87CEFA"> <? $link = mysql_pconnect("db.ubuyibuy.com","it","it") or die("Unable to connect to SQL server"); ?> ........... Second file : Book_Results.phtml
<HTML> <BODY bgcolor="#ADD8E6"> <FORM action="/old?u=http%3A%2F%2Fwww.devshed.com%2FTalk%2FForums%2FForum5%2FHTML%2Fsome.phtml&y=1999" method="post">
------------------ "The fear of the LORD is the beginning of knowledge..." |
|
Eowyn Junior Member |
HI! Thanks for trying to help, I'm sorry I wasn't clearer earlier. I'm trying to retrieve records from a MySQL Database that I created. Book_details BStore_details Book_Store_details I'm trying to retrieve the following fields : The user should be able to enter an ISBN, Title, Subject (or keyword), Author or Book_Store and get a list with the 5 fields displayed above. I'm new to PHP4 and am not quite sure how to do this, but I'm trying my best and I hope I can learn as much as I can because I think PHP is a great language. |
All times are MST (US) | next newest topic | next oldest topic |
![]() |
|
Copyright © 1997-2000 ngenuity. All rights reserved.
Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.