|
|
|
|
![]() ![]() |
Aug 5 2006, 07:57 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 288 Joined: 18-June 06 From: Croatia, Zagreb Member No.: 25,336 |
Well i dont know exactly how to say this but i ll try. So last few months i ve been discovering web design, dreamweaver, photoshop. I learned how to create layout and how to preapare it in dreamweaver but now i am stuck with php. I dont know how to put script in desired cell an lots of other stuff. yeah i am stupid, but i am who i am. all those tutorials are not helping me because they dont tell you how to install script where i want.
i am going to explode. i tried to find finished script on hotscripts.com but i cant/dont_know which one will suite my needs. my layout is here. You see, i need shoutbox script, search script like one here where i can search by song or band names, script which will show the most downloaded songs ( top 5 songs on my layout), and script which will show last 5 updated items.. and so on.. list is quite big, because i have big plans for my site and php is my only problem wright now. My main question would be how to install damn script where i want? Second question would be can someone help me? This post has been edited by BuffaloHELP: Aug 5 2006, 08:09 PM |
|
|
|
Aug 5 2006, 08:14 PM
Post
#2
|
|
|
Desperately seeking "any key" to continue... ![]() Group: Admin Posts: 3,497 Joined: 23-April 05 From: Trap17 storage box Member No.: 6,042 |
Once you insert a PHP script into your current page, you need to rename or save as whateverfilename.php otherwise your PHP script will not work.
If, let's say, you want to insert a PHP script to your finished HTML page within a table setting, a simple way to start would be: HTML <table> <tr> <td> <?PHP {insert the complete php script here} {and close it with} ?> </td> </tr> </table> You'll note that <?PHP is the command to start the PHP script and ?> tells it to stop running the PHP script. For more information on how to use PHP scripts, visit http://www.PHP.net or http://www.w3schools.com for more samples. This above sample is the easiest way to start using PHP scripts for your skill level. As you graduately become more comfortable using PHP code structure, you can then design the whole webpage using only PHP commands, rather than half HTML and half PHP. But the fundamentals of PHP codes come from basic HTML commands. |
|
|
|
Aug 5 2006, 08:25 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 288 Joined: 18-June 06 From: Croatia, Zagreb Member No.: 25,336 |
thanks Buffalo. It helped me a lot. And sorry for posting topic in wrong section.
|
|
|
|
Aug 5 2006, 10:41 PM
Post
#4
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 381 Joined: 1-December 05 From: Xempt..T17 GFX Crew Member No.: 15,202 ![]() |
I always find PHP script hard to work with, but with the right resources it can be done very easily.
|
|
|
|
Aug 6 2006, 06:35 AM
Post
#5
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,153 Joined: 28-May 05 From: Devon, England Member No.: 7,593 ![]() |
There is another option for inserting PHP scripts into a page, especially if you are going to be using the same script on a lot of pages. If you put the script in it's own file (surrounded by the <?PHP and ?>) and give it a logical name, such as shoutbox.php, you can then include that file in any page you want. It also means that if you edit the script you automatically edit it for every page rather than having to go through and change it hundreds of times. To include a file you need 1 line:
CODE Rest of your HTML here... <?PHP include('filename.php'); ?> Some more HTML here... |
|
|
|
Aug 6 2006, 07:00 AM
Post
#6
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 34 Joined: 22-June 06 From: Auckland, New Zealand Member No.: 25,504 |
True that will work but with most scripts, like rvalkass said uses the include function. Antoher way you could do it is to make a pure php file and use variables
for example: CODE <?php $watever="your code here"; ?> then in your main file: CODE <?PHP include('filename.php'); ?> $watever I think that is right but ill have to check u on it This post has been edited by Gem: Aug 6 2006, 07:01 AM |
|
|
|
Aug 6 2006, 11:43 AM
Post
#7
|
|
|
Hidden Secrets can't be told threw just words. One must feel what the other feels to truely understand... ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,522 Joined: 8-January 06 From: Sacramento California Member No.: 16,756 |
True that will work but with most scripts, like rvalkass said uses the include function. Antoher way you could do it is to make a pure php file and use variables for example: CODE <?php $watever="your code here"; ?> then in your main file: CODE <?PHP include('filename.php'); ?> $watever I think that is right but ill have to check u on it yes, the code for using PHP include is CODE <?php include("FILE NAME.html"); ?> and in their case, they would be putting a PHP script into the file so they would need it to be .php i wrote a tutorial on how to use the PHP includes you can find it http://www.trap17.com/forums/how-make-simp...ite-t33636.html there |
|
|
|
Aug 10 2006, 08:08 PM
Post
#8
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 309 Joined: 3-July 06 From: Middle Earth Member No.: 26,018 |
Give yourself lots of space when you are typing/copying your info on to your script.
Lots Of Spaces Doesnt Matter And remember what buffalo said, remember to rename it .PHP , all of your html stuff will still work but without it your php stuff wont. |
|
|
|
![]() ![]() |
Similar Topics