Editing PHP web page

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

Post Reply
mofemi
Forum Newbie
Posts: 6
Joined: Tue May 16, 2006 4:35 am

Editing PHP web page

Post by mofemi »

I opened a PHP web page with Macromedia Dreamweaver but I could not edit the navigation bars. The bars appear only as PHP icons, can anyone assist on how i can have access to the navigation bar contents?
savant
Forum Newbie
Posts: 10
Joined: Mon May 01, 2006 7:56 am

Post by savant »

is the navigation bar generated by a php code.

if so, and you have a wysiwyg(did i get that right?) editor, it;s probably showing you the php icon as your in design mode or something

try opening the same page in notepad, and see if you can find the code that does navigation

if you need more help just post here :)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You might also be able to open that particular section in code view. Dreamweaver has a pretty good code viewer/editor.
mofemi
Forum Newbie
Posts: 6
Joined: Tue May 16, 2006 4:35 am

Editing a PHP web page

Post by mofemi »

I was able to open the web page using notepad. I discovered that the navigation bars are generated using php code as follows:


<?php

main_toplinks();

?>

and

<?php

product_leftlinks();

?>

yet, i cannot locate where the PHP content is. for adequate referencing, u can click the url below

http://www.standardalliancegroup.com/st ... oducts.php

the vertical (red-formatted) and horizontal(green-formatted) links can be observed. Thanks.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Post a single page code. Those link references are functions that are more than likely assembling some outer content that wraps around inner content. Post some code.
mofemi
Forum Newbie
Posts: 6
Joined: Tue May 16, 2006 4:35 am

Editing a PHP web page

Post by mofemi »

Everah, I can see u're d man i need, meanwhile, i don't understand how to post a code, what do i want to achieve for doing that? Can u make it clearer pls.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Take the entire php code for 'products.php', copy it and paste it into a post here. Then hightlight the code you posted and click the 'PHP' button just above the textarea that you pasted. Submit it and it should show us your code as PHP.
mofemi
Forum Newbie
Posts: 6
Joined: Tue May 16, 2006 4:35 am

ignore previous pls

Post by mofemi »

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<?php
include('links.php');
?>
<html>
<head>
<title>Standard Alliance Insurance PLC</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="alliance.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #CCCCCC}
-->
</style>
</head>

<body>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" class="bodytext">
  <tr>
    <td height="72" valign="top"><img src="images/onetop.jpg" width="779" height="72">    </td>
  </tr>
  <tr>
    <td height="21" class="topline">
	<?php
	main_toplinks();
	?>
	</td>
  </tr>
  <tr>
    <td height="229" valign="top">
	<div align="left">	  </div>
	<div align="left">	  </div>
	<table width="779" height="636" border="0" align="left" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" id="table2">
      <tr>
        <td height="23">&nbsp; </td>
      </tr>
      <tr>
        <td height="599" align="left" valign="top">
          <table width="779"  border="0" cellpadding="0" cellspacing="0" id="table3">
            <tr>
              <td width="180" height="438" valign="top" background="images/49734__1x554_scale_F.gif">
			  <div align="justify">
                   <?php
					product_leftlinks();
				?>
                </div>                
                </td>
              <td width="599" valign="top" bgcolor="#FFFFFF"><table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                      <td height="454" valign="top"> 
                        <div align="right"><img src="images/products.jpg" width="586" height="110" border="0"><br>
                          <font color="#006600" size="2"><strong>Downloads </strong></font><br>
                        </div>
                        <p></p>
                        Incorporated in 1981, the company commenced full operations 
                        in 1982 under the name, Jubilee Insurance Company Limited.<br> 
                        <br>
                        The company's operations are fully automated reflecting 
                        a commitment to use technology to drive excellence in 
                        service delivery. Furthermore, the company operates under 
                        the revolutionary concept of total quality management 
                        (TQM). Incorporated in 1981, the company commenced full 
                        operations in 1982 under the name, Jubilee Insurance Company 
                        Limited.<br> <br>
                        The company's operations are fully automated reflecting 
                        a commitment to use technology to drive excellence in 
                        service delivery. Furthermore, the company operates under 
                        the revolutionary concept of total quality management 
                        (TQM). Incorporated in 1981, the company commenced full 
                        operations in 1982 under the name, Jubilee Insurance Company 
                        Limited.<br> <br>
                        The company's operations are fully automated reflecting 
                        a commitment to use technology to drive excellence in 
                        service delivery. Furthermore, the company operates under 
                        the revolutionary concept of total quality management 
                        (TQM). Incorporated in 1981, the company commenced full 
                        operations in 1982 under the name, Jubilee Insurance Company 
                        Limited.<br> <br>
                        The company's operations are fully automated reflecting 
                        a commitment to use technology to drive excellence in 
                        service delivery. Furthermore, the company operates under 
                        the revolutionary concept of total quality management 
                        (TQM). Incorporated in 1981, the company commenced full 
                        operations in 1982 under the name, Jubilee Insurance Company 
                        Limited.<br> <br>
                        The company's operations are fully automated reflecting 
                        a commitment to use technology to drive excellence in 
                        service delivery. Furthermore, the company operates under 
                        the revolutionary concept of total quality management 
                        (TQM). <br> </td>
                </tr>
              </table>                <br>                  <br>
                  <?php
	main_toplinks();
	?>
                </td>
            </tr>
          </table>
          <table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#4D934B">
            <tr>
              <td width="59%" height="51" valign="top" bgcolor="#FFFFFF"><a href="#"><img src="images/prods.gif" width="468" height="60" border="0"></a></td>
              <td width="41%" valign="top" bgcolor="#FFFFFF"><a href="whatwedo.php"><img src="images/newss.gif" width="311" height="62" border="0"></a></td>
            </tr>
            <tr>
              <td height="31" colspan="2" valign="top" class="footerm">
			  <?php
			  copyright_text();
			  ?>
			  </td>
            </tr>
        </table></td>
      </tr>
    </table>
	</td>
  </tr>
</table>
</body>
</html>
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

Moved to code
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I would guess that all of the links on the page that are being generated by the functions are coming from the file 'links.php'.

The actual content of the page is inside of the code you posted.
mofemi
Forum Newbie
Posts: 6
Joined: Tue May 16, 2006 4:35 am

Editing a PHP web page

Post by mofemi »

Yes, truly the page content is embedded in the code but what i need to see is the content of the navigation bars(both horizontal and vertical).

u may check out the page on :

http://www.standardalliancegroup.com/st ... oducts.php

not even a trace of it is visible in the code!
User avatar
tasteslikepurple
Forum Commoner
Posts: 46
Joined: Thu Jan 26, 2006 3:38 am
Location: Bath, UK

Post by tasteslikepurple »

that's not much use, we need to see the actual php code, not the html that php creates. anyway, as Everah said, open up links.php and inside there will probably be two functions, main_toplinks () and product_leftlinks (), those functions are what make the navigation bars. I would guess that all of the stuff is probably in a database somewhere so to edit it, you'll probably need to look in the database and modify the rows in there.
mofemi
Forum Newbie
Posts: 6
Joined: Tue May 16, 2006 4:35 am

Editing a web page: Im very grateful guys..

Post by mofemi »

Guys you a too good. Thanks for not giving up on me. I hope that one day, i'll be so good to assist guys like you've done for me. I have got the navigation bars in the links.php file. I have even edited it to my taste. Thanks guys. Once again, thanks. i'll patronise this forum continually. Everah and tastelikepurple. I doff my cap. I like to meet u beta.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Glad I could help. And congrats on getting your code together.
Post Reply