help me with php please newbie

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alphasurf
Forum Newbie
Posts: 2
Joined: Wed Mar 02, 2005 1:17 am

help me with php please newbie

Post by alphasurf »

hi everyone, i am new to php, I have hosting thru a company and on my control panel it says php 4.3.10 is enabled i was learning from this book i bought and i wrote all the different php pages exactly how it showed in the book. I also made a small two table data base in my sql...

I uploaded thru ftp in binary mode all the php docs to my server, but when i try to go to see a pge how it looks i get an error message.., when uploading php is there a specific place you must upload it to? and where do you upload the database to?

I am sorry i am a newbie to this.. any help is greatly appreciated....
the error message reads.."Parse error: parse error, unexpected '{' in /home/booger/public_html/bookmarks/register_new.php on line 14"

please can anyone help me.... Thanks all newbie alpha
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

There is no specific place you need to upload PHP. As long as it's on a PHP enabled server you're good to go. Which, in your case, you are.. since it's throwing out an error.

And you didn't copy the code correctly, which is why you're getting an error on that line.

Paste that line of code so I can tell you where you messed up.

edit - You need not upload the database, since you're using a hosting account and using cpanel, it should already exist on your server once you created it. You can do this through a PHP page uploaded and executed on your server or through PHPMyAdmin.
alphasurf
Forum Newbie
Posts: 2
Joined: Wed Mar 02, 2005 1:17 am

ok

Post by alphasurf »

this is the error message i get for this php doc i uploaded...

Parse error: parse error, unexpected T_NEW in /home/booger/public_html/bookmarks/db_fns.php on line 7




this is my script that is running the error

<$php

require_once('bookmark_fns.php');
do_html_header('');


display_site_info();
display_login_form();

do_html_footer();
?>


thank you for the help i appreciate it alot i am just starting with php today.... Also where do upload my mysql database files to?
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Although not answering your question you might find it useful to check the php details.
Create a php file containing

Code: Select all

<?php

phpinfo();

?>
This will return the php settings for the server. This will be useful for reference.
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Re: ok

Post by smpdawg »

alphasurf wrote:this is the error message i get for this php doc i uploaded...

Parse error: parse error, unexpected T_NEW in /home/booger/public_html/bookmarks/db_fns.php on line 7
Is the code that you showed from the file db_fns.php? Judging by the file name and what you have posted, I assume the answer is no.
Post Reply