School Map:  Home / Enroll $ Student Records; Class  
$ News @ LIVE Tech Radio * Support/FAQ | Store | FORUMS

 

 (#840 2005-06-19 22:19:55) Post Reply
Page 0 1 2 3 4 5 6 7 8

freja
Need To Set


Enrolled: Jun 2005
Posts: 1
AP: 1



<?
//my first attempt at php
$nickname="freja";
$fav_url="http://www.abc.net.au";
print(
$nickname);
print(
$fav_url);
?>




so i created this in a text editor and named it try.php and uploaded it to my site- is that what we're supposed to do? Anyway it came out looking like this on the page:
frejahttp://www.abc.net.au

So obviously I've done it wrong, if you have more than one string to print and you want a space or line between them what syntax do you use?

 

 (#845 2005-07-04 08:51:36) Post Reply
Page 0 1 2 3 4 5 6 7 8

Wizzard
Need To Set


Enrolled: Jul 2005
Posts: 2
AP: 1



<html>

<head>

<title>My First PHP</title>
</head>

<body>

<style="text-decoration: underline">
<font color="#FF0000"><b>My first PHP program below: </b><br></font>

<?
/*
TO-DO ASSIGNMENT #1: Write a script to store and print your name (nick) and at least one favorite url to the browser using variables to assign them. Make the variable names conform to the rules explained above and use comments in the code explaining each line of code.
*/

//OK My first attempt at PHP

//The variables listed next

$firstname = "John" ;
$surname = "Black";
$favorite_url = "http://www.php.net";

//The script that prints the variables to screen

print("My Name is $firstname and my surname is $surname <br>");
print(
"My favorite url is $favorite_url <br>");
print(
"Thanx for the great site from $firstname ");


// Easy and Simple
//End of ASSIGNMENT #1

?>
</body>

</html>



I hope this is right and what a wonderful idea to have a school like this.

 

 (#846 2005-07-04 08:57:08) Post Reply
Page 0 1 2 3 4 5 6 7 8

Wizzard
Need To Set


Enrolled: Jul 2005
Posts: 2
AP: 1

Hey freja
If you haven't gotten the answer yet then you can try <br> It creates a spacing.
Cheers

 

 (#860 2005-08-27 13:00:31) Post Reply
Page 0 1 2 3 4 5 6 7 8

hyster
Need To Set


Enrolled: Aug 2005
Posts: 2
AP: 1

i hope this is ok
<?php
$myname="hyster";//my name
$mysite="www.ultimate-fighters.com";//my fav site
$myage=32;//my age
print($myname);//prints my name
print($mysite);//prints my fav site
print($myage);//prints my age
?>

 

 (#861 2005-08-28 03:15:50) Post Reply
Page 0 1 2 3 4 5 6 7 8

Sabiha
Need To Set


Enrolled: Aug 2005
Posts: 1
AP: 1

I am new in this class, give me suggestion that how I do improve my programing and reduce the bugs.
Thanks
Here is following my code.

<HTML>
<HEAD>
<TITLE>SchoolScript.com Assignment 1</TITLE>
</HEAD>
<BODY>
<?php
// This program will use php to display my name and website using variables.
// Assign the variables.
$firstname='Sabiha';
$lastname='Shafqat';
$nickname='Sab';
$website='http://www.mta.tv';
// Display information in browser.
print("Hello,my name is $firstname $lastname and my nick is $nickname.<br>I like this site $website.");
// Print the current date.
print("<br>Today is: ".date("m/j/y"))
?>
</BODY>
</HTML>

 

 (#862 2005-08-29 15:02:49) Post Reply
Page 0 1 2 3 4 5 6 7 8

phpfreak
Need To Set


Enrolled: Aug 2005
Posts: 2
AP: 1



<HTML>
<HEAD>
<TITLE>SchoolScript.com Assignment 1</TITLE>
</HEAD>
<BODY>
<?php
// This program will use php to display my name and website using variables.
// Assign the variables.
$firstname = "Sakib";
$lastname = "Ahmed";
$website = "http://potternet.frihost.net";
// Display information in browser.
print ("Hello, my name is $firstname $lastname.<br>Ny own website is $website");
// Print the current date.
print ("<br>The current date is: " . date("m/j/y"))
?>
</BODY>
</HTML>


 

 (#863 2005-08-29 15:03:16) Post Reply
Page 0 1 2 3 4 5 6 7 8

phpfreak
Need To Set


Enrolled: Aug 2005
Posts: 2
AP: 1



<HTML>
<HEAD>
<TITLE>SchoolScript.com Assignment 1</TITLE>
</HEAD>
<BODY>
<?php
// This program will use php to display my name and website using variables.
// Assign the variables.
$firstname = "Sakib";
$lastname = "Ahmed";
$website = "http://potternet.frihost.net";
// Display information in browser.
print ("Hello, my name is $firstname $lastname.<br>Ny own website is $website");
// Print the current date.
print ("<br>The current date is: " . date("m/j/y"))
?>
</BODY>
</HTML>


 

 (#866 2005-09-06 06:59:29) Post Reply
Page 0 1 2 3 4 5 6 7 8

Sudheer
Need To Set


Enrolled: Aug 2005
Posts: 2
AP: 1

<?
//myname stores my name.
$myname=Sudheer;
//mysite stores my favourite site
$mysite=www.script-school.com;
//Here goes the print command
printf(My name is $myname and my favourite site is $mysite);
?>

 

 (#870 2005-09-09 18:41:04) Post Reply
Page 0 1 2 3 4 5 6 7 8

helmy
Need To Set


Enrolled: Sep 2005
Posts: 1
AP: 1

Here it be assignment 1.



<HTML>

<HEAD>

<TITLE>SchoolScript.com Basic PHP Assignment 1</TITLE>

</HEAD>

<BODY>

<?php

// This program will use php to display my name
// and website using variables.

// Assign the variables.

$nick = "helmy";

$website = "http://csourcesearch.net/";

// Display information in browser.

print ("Hello, my name is $nick.<br>
My favorite website is $website."
);

?>
</BODY>

</HTML>


 

 (#871 2005-09-10 15:49:22) Post Reply
Page 0 1 2 3 4 5 6 7 8

pauliuse30
Need To Set


Enrolled: Sep 2005
Posts: 1
AP: 1

<?
//variables
$mynickname="pauliue30";
$myfavoriteurl="http://pgabdankas.siteburg.com/";
//data printing
print("Hi, my nick is $mynickname, see my progress in PHP on <br> $myfavoriteurl");
?>

 

 (#872 2005-09-30 19:04:22) Post Reply
Page 0 1 2 3 4 5 6 7 8

jewelz
Need To Set


Enrolled: Sep 2005
Posts: 2
AP: 1



<html>
<head>
<title>script school week 1 Assignment</title>
</head>
<body>
<?php
//Assigning variables
$fname='Jewelz';
$lname='Morgan';
$nick='Jewelz';
$age='34 years';
$mstatus='Married';
$child='3 children';
$bookmark='<a href="http://www.scriptschool.com/">Scriptschool</a>';
//ok lets see if this works or not
print("Hi my name is $fname $lname.<br>My friends call me $nick.<br>I am $age old.<br>I am $mstatus with $child.<br> My favourite website is $bookmark.");
?>
</body>
</html>


 

 (#873 2005-10-10 14:47:53) Post Reply
Page 0 1 2 3 4 5 6 7 8

acsinclair
Need To Set


Enrolled: Aug 2005
Posts: 3
AP: 1

Hi All,

Here is my homework from Week 1:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>PHP Week One</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
/*This Script will display information assigned to variables. This is my first ever PHP Script.*/

$nick="Erica"; //My Nickname
$favoriteSite='<a href="http://www.alistapart.com/" target="_blank">A List Apart</a>'; //My Favorite Website

print("Hello, my name is $nick, and my favorite website is $favoriteSite!"); //Prints A String
?>

</body>
</html>


Cheers,
Erica

 

 (#877 2005-10-21 19:41:09) Post Reply
Page 0 1 2 3 4 5 6 7 8

Goudarzi
Need To Set


Enrolled: Oct 2005
Posts: 9
AP: 1

I just wanted to thank you for this... i'm learning alot. This week was mostly review for me. I had a basic knowledge of PHP already

example code:

<?
$Text= "Hello World";
$Name= "My name is Adam";
print(" $Text $Name ");
// This was a simple program made for fun
?>

 

 (#879 2005-10-28 18:05:48) Post Reply
Page 0 1 2 3 4 5 6 7 8

DarePoo
Need To Set


Enrolled: May 2005
Posts: 10
AP: 1


<?php

//Defining strings
$nick = Mike;
$favurl = "http://www.projectmobster.com/";

//Printing sentences
print('Hi! My nick name is $nick <br>');
print(
'My favorite website is $favurl');

?>
<html>
<head>
<title>Week #1</title>
</head>
</html>


 

 (#890 2005-11-22 20:32:35) Post Reply
Page 0 1 2 3 4 5 6 7 8

emanoyhl
Need To Set


Enrolled: Nov 2005
Posts: 3
AP: 1

are these boards still here? :)

<?

$name = "emanoyhl";
$url = "http://www.insidebear.com";

print("My name is $name, my favorite website is <a href="$url">INSIDE Bear Magazine</a>!");

?>

 

 (#900 2005-11-29 13:46:25) Post Reply
Page 0 1 2 3 4 5 6 7 8

Garth
Need To Set


Enrolled: Nov 2005
Posts: 1
AP: 1

<?
/* This is my first attempt at php */
/* This will print This is Garth! in the browser*/
print(This is Garth!);
/* This will tell me what version of Php is running on the server*/
printf(My server is running php version %s, phpversion())
?>
<?
// This will print This is Garth? using a string.
$username = This is Garth?;
print($username);
?>
<?
/*This will print http://www.google.com*/
print(http://www.google.com);
?>

 

 (#902 2005-12-08 11:15:48) Post Reply
Page 0 1 2 3 4 5 6 7 8

mgh397
Need To Set


Enrolled: Nov 2005
Posts: 2
AP: 1

<html>
<head>
<title>Michel Garcia's Profile</title>
</head>
<body>
<center>
<?php
//This script is made to display informaiton about me via assigned variables
//Stored details in the variables
$firstname='Michel';
$surname='Garcia';
$nick='mgh397';
$email='<a href="mailto:mgh397@hotpop.com">mgh397@hotpop.com</a>';
$site='<a href="http://www.mgh397.be/phpschool/001.php" target="_blank">www.mgh397.be/phpschool/001.php</a>';
//Print My Details
print("Hello, my name is $firstname $surname.<br/>My nickname is $nick.
<br/>My e-mail is $email.<br/>My website is $site.");
?>
</center>
</body>
</html>

Is it right?

 

 (#908 2005-12-29 18:22:19) Post Reply
Page 0 1 2 3 4 5 6 7 8

Dylan
Need To Set


Enrolled: Dec 2005
Posts: 14
AP: 1



<html>
<head>
<?
/* TO-DO ASSIGNMENT #1: Write a script to store and print your name (nick) and at least one favorite url to the browser using variables to assign them. Make the variable names conform to the rules explained above and use comments in the code explaining each line of code. Cut and paste your code to the Week 1 forum to share with others in the appropriate "To-do Assignment #1" folder.
*/

// Make variable for my name
$name = "Dylan";

// and fav URL
$favurl = "http://www.AlGore.org"

// display the name
print($name);

// display the url
print($favurl);

?>


 

 (#909 2005-12-29 18:24:09) Post Reply
Page 0 1 2 3 4 5 6 7 8

Dylan
Need To Set


Enrolled: Dec 2005
Posts: 14
AP: 1

Oops, I've already messed up... ;) Forgot to close my HTML and HEAD tags.



<html>
<head>
<?
/* TO-DO ASSIGNMENT #1: Write a script to store and print your name (nick) and at least one favorite url to the browser using variables to assign them. Make the variable names conform to the rules explained above and use comments in the code explaining each line of code. Cut and paste your code to the Week 1 forum to share with others in the appropriate "To-do Assignment #1" folder.
*/

// Make variable for my name
$name = "Dylan";

// and fav URL
$favurl = "http://www.AlGore.org"

// display the name
print($name);

// display the url
print($favurl);

?>
</head>
</html>


 

 (#910 2005-12-29 18:27:07) Post Reply
Page 0 1 2 3 4 5 6 7 8

Dylan
Need To Set


Enrolled: Dec 2005
Posts: 14
AP: 1

Dear Lord, I stink... third time is the charm:



<html>
<head></head>
<body>
<?
/* TO-DO ASSIGNMENT #1: Write a script to store and print your name (nick) and at least one favorite url to the browser using variables to assign them. Make the variable names conform to the rules explained above and use comments in the code explaining each line of code. Cut and paste your code to the Week 1 forum to share with others in the appropriate "To-do Assignment #1" folder.
*/

// Make variable for my name
$name = "Dylan";

// and fav URL
$favurl = "http://www.AlGore.org"

// display the name
print($name);

// display the url
print($favurl);

?>
</body>
</html>


 

 (#928 2006-01-22 10:06:11) Post Reply
Page 0 1 2 3 4 5 6 7 8

yanny0808
Need To Set


Enrolled: Jan 2006
Posts: 3
AP: 1



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TO-DO ASSIGNMENT #1</title>
</head>

<body>
<?php
//assigning variabel nickname
$nickname="Yanny0808";

//asigning variabel url and url2
$url="<a href='http://www.google.com'>Google</a>";
$url2="<a href='http://video.google.com/'>http://video.google.com/</a>";

//print it to the screen
print 'My nickname is $nickname.<br>';
print
"$url is the best search engine in the world! They even have video's to search for: <br>";
print
"$url2";
?>
</body>
</html>


 

 (#933 2006-01-26 09:42:40) Post Reply
Page 0 1 2 3 4 5 6 7 8

Jan
Need To Set


Enrolled: Jan 2006
Posts: 1
AP: 1



<?
$nick
="Jan"; //My name
$url="http://writeside.net"; //Favourite URL
Print("Hi! My name is $nick and my favourite site is $url.");
?>



 

 (#934 2006-01-28 13:26:11) Post Reply
Page 0 1 2 3 4 5 6 7 8

host07
Need To Set


Enrolled: Jan 2006
Posts: 1
AP: 1

I just finished this assiignment. It works comments welcome.
//script variables

$my_name =Paul;
$my_lastname =Hardy;
$favorite_url =http://www.scriptschool.com;


//screen output

echo (My name is $my_name $my_lastname);
echo (<br>My favorite url is );
echo ($favorite_url);
echo (<br> The current date is: . date(j/m/y))

?>

 

 (#952 2006-02-26 14:52:10) Post Reply
Page 0 1 2 3 4 5 6 7 8

DrgnLdy
Need To Set


Enrolled: Jan 2006
Posts: 3
AP: 1

assignment 1 a bunch of trial and error but i finally got it


<html>
<head>
<title> My first PHP Assignment</title>
</head>
<body>
<?php
//assignment 1
//print name and fav url to browser
$firstname='Val';
$nickname='DragonLady';
//fav url
$url='http://www.boxerjam.com';
print(
"My name is $firstname <br> My nickname is $nickname. <br>
My favorite website is $url"
);
?>
</body>
</html>


 

 (#954 2006-02-28 19:01:39) Post Reply
Page 0 1 2 3 4 5 6 7 8

mrgoodrat
Need To Set


Enrolled: Feb 2006
Posts: 3
AP: 1

<?
//Declare some variables
$myName = "Russell Block";
$myWebsite = "www.mrgoodrat.com";

//Print data
print "Name: $myName <br>Web : $myWebsite";
?>

 

 (#957 2006-03-03 08:32:57) Post Reply
Page 0 1 2 3 4 5 6 7 8

ZeusXena
Need To Set


Enrolled: Mar 2006
Posts: 7
AP: 1


My First PHP Script

<HTML>
<HEAD>
<TITLE> Learning Php Lesson 1 </TITLE>
</HEAD>
<BODY>
Hi There!!!


<script language="php">


/*
‹(•¿•)›My First Script‹(•¿•)›

*/

// Using variables To Display Some Informations About Me
//Store The Variables
$first = 'Nicholas';
$last = 'ZeusXena';
$site = '<a href="http://www.zeus-site.com" target="_blank">My We Site</a>';
$email = '<a href="mailto:zeus.a@ntlworld.com">Mail</a>';


//Brower Display Informations
print ("<br>Nice to be here!!!<br>My Name Is:$first<br>My Last name Is:$last<br>This

is $site<br> My Email $email");

</script>

</BODY>
</HTML>

My Brower Displays The Following


Hi There!!!
Nice to be here!!!
My Name Is:Nicholas
My Last name Is:ZeusXena
This is My We Site
My Email Mail

I'm so happy! I never Thought I will be able to right PHP Script.

Thanks To This Web Site, For Me Is Easy Now
To Understand Some PHP Code. :-)

Great!!!!!!!

 

 (#958 2006-03-03 08:37:12) Post Reply
Page 0 1 2 3 4 5 6 7 8

ZeusXena
Need To Set


Enrolled: Mar 2006
Posts: 7
AP: 1


My First PHP Script

<HTML>
<HEAD>
<TITLE> Learning Php Lesson 1 </TITLE>
</HEAD>
<BODY>
Hi There!!!


<script language="php">


/*
‹(•¿•)›My First Script‹(•¿•)›

*/

// Using variables To Display Some Informations About Me
//Store The Variables
$first = 'Nicholas';
$last = 'ZeusXena';
$site = '<a href="http://www.zeus-site.com" target="_blank">My We Site</a>';
$email = '<a href="mailto:zeus.a@ntlworld.com">Mail</a>';


//Brower Display Informations
print ("<br>Nice to be here!!!<br>My Name Is:$first<br>My Last name Is:$last<br>This

is $site<br> My Email $email");

</script>

</BODY>
</HTML>

My Brower Displays The Following


Hi There!!!
Nice to be here!!!
My Name Is:Nicholas
My Last name Is:ZeusXena
This is My We Site
My Email Mail

I'm so happy! I never Thought I will be able to right PHP Script.

Thanks To This Web Site, For Me Is Easy Now
To Understand Some PHP Code. :-)

Great!!!!!!!

 

 (#959 2006-03-03 08:47:40) Post Reply
Page 0 1 2 3 4 5 6 7 8

ZeusXena
Need To Set


Enrolled: Mar 2006
Posts: 7
AP: 1

Sorry I posted my assignment twice

also notice I spelt browser Incorrectly

I'm a Greek and I am always making spelling mistakes

 

 (#986 2006-04-05 22:50:20) Post Reply
Page 0 1 2 3 4 5 6 7 8

GH0ST
Need To Set


Enrolled: Apr 2006
Posts: 2
AP: 1

Did i miss something? how do i get everything on its own line? Or is this something we will learn later?


<?
//These are the strings where I am storing my information.

/* I can also type my comments using multiple line
like this. This is just for my future reference
this method is called the C type method */

$username="PUREMUZIKARMY";
$firstname="DJ";
$middleinitial="A";
$lastname="Johnson";
$favoritewebpage="www.howstuffworks.com";


//I am printing to my form here.

print("Hello $firstname $middleinitial $lastname. ");

print(
"Here is your username and favorite webpage. ");

print(
" Username=$username ");

print(
" Favorite website=$favoritewebpage ");

?>



 

 (#989 2006-04-18 00:57:45) Post Reply
Page 0 1 2 3 4 5 6 7 8

isiahw1
Need To Set


Enrolled: Apr 2006
Posts: 2
AP: 1



<?
$name_first
= "Isiah"; //Insert first name here.
$name_last = "Wheeler"; //Insert last name here.
$url_fav = "www.Google.com"; //Favorite URL goes here.
print("My name is $name_first $name_last and my favorite site is $url_fav");
?>



 

  Page 0 1 2 3 4 5 6 7 8

View Previous Thread
Print this page Print This Page

View Next Thread

School Map:  Home / Enroll $ Student Records; Class  
$ News @ LIVE Tech Radio * Support/FAQ | Store

Advertising | Link To Us | Privacy 
Copyright 2000-2002 Script School Productions / KMR Enterprises 
No part of this website may be reproduced, copied and/or distributed in any medium 
without express written permission