Page 1 of 1

help me with php please newbie

Posted: Wed Mar 02, 2005 1:22 am
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

Posted: Wed Mar 02, 2005 1:26 am
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.

ok

Posted: Wed Mar 02, 2005 1:38 am
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?

Posted: Wed Mar 02, 2005 3:05 am
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.

Re: ok

Posted: Wed Mar 02, 2005 8:50 am
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.