Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 20th, 2004, 5:30 PM   #1
bonkers
Newbie
 
Join Date: Oct 2004
Posts: 4
Rep Power: 0 bonkers is on a distinguished road
Hi,

This is a daft idea for a script but I was bored, So decided to give it a try.

I get the error

Quote:
Parse error: parse error, unexpected $ in /home/bonkersw/public_html/welcome/welcome.php on line 36
when running the script

if you could look at the code for me and try and see whats wrong I would appreciate it. This is my first script and I never really bothered with php untill today!


<?php

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//      Welcome Script 0.1    \\ 
//    http://bonkersworld.com    \\ 
//      Made by Craig Eaton     \\
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


//Edit these below to match your site settings.
// Take out the comment tag on the date setting if you want to add the
// date you created the site.
//Same for age.

$creator = "Your Name";
$site = "Your website name";
//$date = "Todays date. d/m/y format";
$about = "What the site is about";
$why = "Why did you make this site?";
//$age = "How old are you?";
$why = "Why did you decide to create the site?";
$old = "are you old/young";

// DO NOT EDIT BELOW THIS LINE UNLESS TO TAKE OUT THE COMMENT TAGS.

echo "Hello, my name is $creator and welcome to $site!<br>";

//echo "I put this site up on the $date, so if you're coming along time after that
//it's doing well! I'm $age, so i'm pretty $old, for this!<br>";

echo "This site is about $about, and I hope you enjoy it and add us to
your bookmarks. I made this site becuase $why, so I hope you enjoy it as much
as I did making it. I decided to make the site because $why<br>.; 

?>
bonkers is offline   Reply With Quote
Old Oct 20th, 2004, 5:53 PM   #2
bonkers
Newbie
 
Join Date: Oct 2004
Posts: 4
Rep Power: 0 bonkers is on a distinguished road
have figured it out. Missed out a quotation at the end
bonkers is offline   Reply With Quote
Old Oct 20th, 2004, 10:17 PM   #3
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,473
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
yes. the last line.

also, make sure your variables have values.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Oct 21st, 2004, 10:08 AM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
yeah empty vars are just a plain bad programming practice.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Oct 21st, 2004, 5:19 PM   #5
bonkers
Newbie
 
Join Date: Oct 2004
Posts: 4
Rep Power: 0 bonkers is on a distinguished road
I know it's not perfect. Thats the first time i'd even attempted to make anything out of php. I've read no books, or sites. It's just what i've picked up from editing php scripts for my website
bonkers is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:32 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC