PHP help please

Associate
Joined
6 Aug 2004
Posts
2,084
Location
Essex
Hi, im new to php (very new, infact 2 days new) and i am even newer to online ordering, but i was recommended to try out oscommerce.

Everything seemed to be going ok, i was starting to get the hang of the way it works etc.

Then i decided to try and edit the php code for contact_us.php. I went to file>save as, then saved the contact_us.php to my harddisk, which also made a folder called contact_us files. I thought this was a decent way of making a backup.

So after trying to edit contact_us.php, then uploading it, i got a nasty error when trying to load contact_us page on the site. So i thought i could simply re-upload the 'backup' of contact_us.php from my harddrve.

But it now wants its images in a completely new folder (called contact_us files).

Can some php guru please help me out, as im scared im going to have to start over again from scratch, and id like not to do that.

Thanks soo much in advanced.
The site is here - EDIT - REMOVED
contact Us link on the bottom left side.
Ryan
 
Last edited:
Did you make the copy using frontpage by any chance? :p Just upload the entire contact_us folder to the same directory as the contact_us.php file :)
 
I just loaded the site using firefox, clicked contact us, then saved the page.

:(

Surely, it should be looking for its images etc in the same places as what index.php are looking at ?
 
Erm, saving a page from firefox won't save the contents of the file on the server, it will only save what the server sent to the browser, so there'll be no PHP at all in the contact_us.php file you saved...

If you want to upload/download to/from your site you need to use FTP (I'd recommend SmartFTP).
 
Yer i use smartFTP to upload my files. But for some reason i had the genius idea hat going to firefox and simply going to file>save as was just as good to backup that particular file.

Am i stuck with this and need to start from scratch? Or is there a was to fix it ?
Cheers for the help so far guys.
 
Download OScommerce, unzip, upload the contact_us.php page again.

Not to be harsh, but you really shouldn't be trying to setup an online shop if it's a serious project and you have no clue :/
 
Download OScommerce, unzip, upload the contact_us.php page again.

I tried it, and i get the following message now. EDIT - REMOVED

Not to be harsh, but you really shouldn't be trying to setup an online shop if it's a serious project and you have no clue :/

Im not actually running it, im just setting this up. Ok i havent done it before, but at the end of the day do you need to know php to sell items ? Once this is setup, it should all be fine. I dont see any reason why it wont work. Ill only use paypal methods to start with for security reasons.
Thanks though anyway.
But it didnt work :(
 
Last edited:
Ry@n said:
I tried it, and i get the following message now. http://mxmadness.co.uk/cart/contact_us.php



Im not actually running it, im just setting this up. Ok i havent done it before, but at the end of the day do you need to know php to sell items ? Once this is setup, it should all be fine. I dont see any reason why it wont work. Ill only use paypal methods to start with for security reasons.
Thanks though anyway.
But it didnt work :(

that error (to my knowledge) means that you have tried declaring same funtion twice...
 
Freak_boy said:
well go to database.php on line 13 you should notice { just put /* at that line and */ after the matching }

I'm pretty sure that it will be a case of including the file twice, not declaring the function in two separate places.
 
Ry@n said:
Do you know how i can change that so it doesnt do it anymore?
It's likely that since you have no idea what you're doing, you've broken it. Sorry. Probably included the same file twice somewhere, or not correctly reverted *** changes you made, etc.

Im not actually running it, im just setting this up. Ok i havent done it before, but at the end of the day do you need to know php to sell items ?
Yes.

Im not actually running it, im just setting this up.
Get the Simple Template System contribution and code a HTML template then let someone who understands HTML/PHP/Oscommerce to integrate the design, then :)
 
I am so new to php, but i was able to fix the problem and you dont know how good i feel. Thought i lost it all then :eek:

All i did was install a second oscommerce script on a different server, logged into admin and went into the "define language" bit, copied all the contact_us.php php language, and pasted it into my mxmadness one.

I dont know how the langauge works yet, but i was able to fix it :D
 
Back
Top Bottom