justuptime.com - monitor your servers & websites

i wrote my first php script today

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

He has: 388 posts

Joined: Apr 2005

Yes iwrote my first php script today here it is
Here it is

andy206uk's picture
DeveloperModerator

He has: 1,754 posts

Joined: Jul 2002

Daft question but what does it do?

The first php script I ever wrote went something like this:

<?php echo("hello world"); ?>' Smiling

Regarding how you put html in php... (your question on your page). It's easy! Simply close the php script and enter normal html! you can do this as much as you like! like this:

<?php

$title = "amazing php script";
$description = "la la la la la la la la la";

?>

<h1>My title is <?php echo("$title"); ?></h1>
<p>heres a description <?php echo("$description"); ?></p>

'

Andyk

Blog of a Web Designer
Give a man a fish and you feed him for a day. Teach him to use the Net and he won't bother you for weeks.

He has: 388 posts

Joined: Apr 2005

It dosn't do anything Its just there

They have: 52 posts

Joined: Dec 2002

Very cool, and congratulations! Smiling
I actually saved a few exercises I did from a book a long time ago.
Take a Look

andy206uk's picture
DeveloperModerator

He has: 1,754 posts

Joined: Jul 2002

it doesn't do anything? How can it not do anything? Surely it at least echo's out some html or accesses a variable or something?

Andyk

Blog of a Web Designer
Give a man a fish and you feed him for a day. Teach him to use the Net and he won't bother you for weeks.

He has: 388 posts

Joined: Apr 2005

O sorry i mean its not useful but it echos text