473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

linking within a single page in PHP

Mabuhay! I'm new in PHP and i want to create a single PHP page where
the links are linked to contents within that single page. can anyone
please help me with this? thanks in advance to anyone who is willing to
help!

Jun 5 '06 #1
3 1393
Something like this maybe??

<---START OF CODE--->

<html>
<head>
<title>TITLE HERE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"><div align="center"><a
href="?link=1">Link1</a></div></td>
<td><div align="center"><a href="?link=2">Link2</a></div></td>
<td><div align="center"><a href="?link=3">Link3</a></div></td>
<td><div align="center"><a href="?link=4">Link4</a></div></td>
</tr>
</table>
<br>
<?
if($link=="1") {
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>LINK 1 DETAILS HERE</td>
</tr>
</table>
<? } ?>
<p>
<?
if($link=="2") {
?>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>LINK 2 DETAILS HERE</td>
</tr>
</table>
<? } ?>
<p>
<?
if($link=="3") {
?>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>LINK 3 DETAILS HERE</td>
</tr>
</table>
<? } ?>
<p>
<?
if($link=="4") {
?>
</p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>LINK 4 DETAILS HERE</td>
</tr>
</table>
<? } ?>
</body>
</html>

<---END OF CODE--->

You can also easily grab things from database by going

<?
if($link=="1") {

// DATABASE QUERY
$recall=" SELECT * FROM table WHERE something = '" . $something . "' ORDER
BY something";
$result= mysql_query($recall);

?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>LINK 1 DETAILS HERE<br>
DATABASE QUERY: <? $result['something']; ?></td>
</tr>
</table>
<? } ?>
<ar******@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Mabuhay! I'm new in PHP and i want to create a single PHP page where
the links are linked to contents within that single page. can anyone
please help me with this? thanks in advance to anyone who is willing to
help!

Jun 5 '06 #2
ar******@gmail.com wrote:
Mabuhay! I'm new in PHP and i want to create a single PHP page where
the links are linked to contents within that single page. can anyone
please help me with this? thanks in advance to anyone who is willing to
help!


Unless I misunderstood you (which is very possible), it sounds like this is just
straight HTML.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 5 '06 #3
I also put up a test for you http://www.williams-nz.net/test.php
Jun 5 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
33
by: randau | last post by:
Linking to a Targeted Browser Window I'd like to open reference links to other web sites in a separate browser window from the browser window hosting my own web site pages. The Link Target...
14
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
3
by: shardy | last post by:
Hello, I am trying to create a code repository for myself and am having trouble linking to files. Basically, the web server computer has drives from several other computers nfs mounted to it --...
4
by: Harlequin | last post by:
I have a question concerning the need to trigger events within a "child" subform which is itself enbedded within a master "parent" form and which is accessible via a tab in the parent form. Becuase...
11
by: =?Utf-8?B?aWduaGVucnk=?= | last post by:
I have a managed C++ project and two C# projects. All are class library projects. The C++ project links with native C++ static libraries and references to one C# project. The projects structure...
4
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.