...

View Full Version : ASK php dan html?



likon
07-17-2007, 06:41 AM
I am wondering . if I were to call html tag in php code
It just should be like this, right?
<?php
echo " any html tag"
?>

righT?

so what 's wrong with my script?


<?php
echo"
<body>
<div align=center><font size=+3 family=arial color=blue> <b>This site is currently under development m </b> </font> </div>
<br>
<p>
<div align=center><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHfwYJKoZIhvcNAQcEoIIHcDCCB2wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYD VQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2 ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCyz30aaJKDx/FiNIw8OouzHULmNG2LhC9//QNRdlACqDILM2lJsXfZW7NUL75SV7fLM0UlipBLZO/TKx+l9pNkoi/qvDYKTtiPQJsH96j3RBIieFZOKBaieoxQMSHWix3BmjyXNqNcnUVrPDNPLLwih3jDNlN7cRuXJsB5tVV05jELMAkGBSsOAwIaBQA wgfwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQITIRAzHnRVGOAgdijkkjlhdydf4aPoESrMA7Nmv7sHcfvXpwxC7kjkCWpyfaWSGx SfIEOf7drWKsOMTS7yf5lHg4uJf16CcSozxK2+aTfisSpEQ+KtVp6JOR7l6HiPYwHocg5fuVsXjpBfCzq0t7td0X7/xNYXo95B+qL69pTgViuPVJdkSGVM38uHbEuXwEl5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GSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIy fmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA 1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZ UBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNzAyM TYwMzQ0MDFaMCMGCSqGSIb3DQEJBDEWBBREyPj+wNfOmWQ7QFTVFgbhFs6aHzANBgkqhkiG9w0BAQEFAASBgHtEpIDrxgDo078q7 b0ggG333NkyO/qUTlZCBhhmH6MsQanrX93n5e7HHVkgzTP7gzRYBdZQr94xnWErLJ3VLzB3ak5G7mlF6vARwBGnfRQYCZXv8RlrhWucfxDlwmTAY1 XtzLR2ymoqCMM3wC4TkrmkAyGpGqwA9uVyj8ScVct+-----END PKCS7-----
">
</form></div></p>

<br>

<div align=center><font family=Courier New size=+2><p> Click here to see list of my project</p> </font> </div>

</body>
"
?>



I suspect it will be because that paypal thing I put on . right?
Thanks.

likon
07-17-2007, 06:56 AM
well maybe I missed ; after using echo . but it still doesnt work . what you guys think ?

zain1992
07-17-2007, 07:08 AM
try this:


<?php
echo <<<EOT

//Your HTML Coding

EOT;
?>

NancyJ
07-17-2007, 08:30 AM
Just to expand - the problem is that your html contains " which need to be escaped or replaced with ' if you want to enclose your string with "
The EOT thing will work but you could just as easily close your php tags above the html and reopen them when you need to do some php again. You're not using any php variables in that chunk of code so theres no reason to use php to output it

likon
07-17-2007, 07:44 PM
it works now . yea.. maybe I simply use html would be enough. but anyway I am just new to programming so ...you know. alil bit of try and error... :) :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum