PDA

View Full Version : experianced vB'er read this =)


ryany
Wed 13th Dec '00, 1:50am
Hi there. Ok I got my vB , I recently finished customising and adding hacks into my vB and now i come to my one last obstacle. (ok, One of the last . This one is a major one though :) )

Here is my problem:

-------------------------------------------------------------------
My website consists of 2 tables , one on the left(main table) and another one on the right(links,poll,etc)

My problem comes with the table on the right.
Say I have this poll script ( uses php and MySQL )
I need to add this into my right table ....

The main poll script is something like this...

(poll.php)
~~~~~~~~~~~~~~~~~~~~~~~
<?php

//some php code here

?>
<html>

//some html

<?php
//another php section
?>

//more html

</html>
~~~~~~~~~~~~~~~~~~~~~~~

What I am wondering is.....
------------------------------------------------------------
1)Where do i add the

<?php
// the first
?>

which is above the <html> tag for the page
------------------------------------------------------------
2)and where does the code within the <html> tags go?


Really hope someone out there can help me. I'll give more details if you need it. Just ask

Thank you.

ryany
Wed 13th Dec '00, 9:48pm
anyone ...? .......

ryany
Thu 14th Dec '00, 3:56am
someone ....?
Anyone ....?

KeithMcL
Thu 14th Dec '00, 6:34am
Ryan,

Simply open the PHP tags when you have php code and close it when that particular coding finishes.

Example:

Say you wanted to have a right hand side menu with a PHP poll first, some 88x31 banners, and then another php script of some sort.

You'd simply write the page as normal and when you come to the php poll you open the php tag <?php and when the code for the poll is finished you close the php tag ?>

Then you continue on with the rest of your HTML.

When you come to the second php script you open the php tag again and close them when the php code finishes.

Just remember to save the file with a .php or .php3 or .phtml extention otherwise the php code will not execute on the server.

Hope this helps :)