Right i am new to php,
i Download ed a file which had pp in it, i got it working on the site the only thing is i wanna know how can you put backgrounds up using php, and if i cant do that how would i go about doing it then?put backgrounds up?... I don't understand what you mean really. You use HTML to put a background on the page, if that's what you mean, not PHP. The page had 'pp' in it? Do you mean PHP? I'm unfamiliar with the term pp.You use PHP to write out a stream of valid HTML code to the browser. The PHP script can write the HTML code dynamically based on programming decisions and logic, rather than serving up a static HTML page.
The output should be valid HTML code, so you just insert whatever hTML code you want, and insert it into the relevant place in the code.
I am not quite sure what your question is?You should have most of the page done in HTML, but only put the PHP parts you need inside <? and ?> tags.
If you need to have HTML in the PHP part, you can use
<?
echo "<table width=100 height=200><tr><td>";
echo "This is the text inside the table.";
echo "</td></tr></table>";
?>
That would produce a very basic table, because first PHP will read that, print it out (echo) it just as
<table width=100 height=200><tr><td>
This is the text inside the table.
</td></tr></table>
and then your web browser will take if from there and produce a table.
You can add your background attribute through this method, but it is more than likely that you can get around doing it by just using plain HTML.
Remember: you cannot use parentheses ("") around attributes such as width, or you will get a parse error.
BleuIce
i Download ed a file which had pp in it, i got it working on the site the only thing is i wanna know how can you put backgrounds up using php, and if i cant do that how would i go about doing it then?put backgrounds up?... I don't understand what you mean really. You use HTML to put a background on the page, if that's what you mean, not PHP. The page had 'pp' in it? Do you mean PHP? I'm unfamiliar with the term pp.You use PHP to write out a stream of valid HTML code to the browser. The PHP script can write the HTML code dynamically based on programming decisions and logic, rather than serving up a static HTML page.
The output should be valid HTML code, so you just insert whatever hTML code you want, and insert it into the relevant place in the code.
I am not quite sure what your question is?You should have most of the page done in HTML, but only put the PHP parts you need inside <? and ?> tags.
If you need to have HTML in the PHP part, you can use
<?
echo "<table width=100 height=200><tr><td>";
echo "This is the text inside the table.";
echo "</td></tr></table>";
?>
That would produce a very basic table, because first PHP will read that, print it out (echo) it just as
<table width=100 height=200><tr><td>
This is the text inside the table.
</td></tr></table>
and then your web browser will take if from there and produce a table.
You can add your background attribute through this method, but it is more than likely that you can get around doing it by just using plain HTML.
Remember: you cannot use parentheses ("") around attributes such as width, or you will get a parse error.
BleuIce