|
|
 |
June 7th, 2008, 04:05 PM
|
#1
|
|
Reputable Member
Join Date: Feb 2008
Location: UK
Posts: 165
Thanks: 3
Thanked 4 Times in 4 Posts
Rep Altering Power: 0
|
ecard system
Hi there, we are planning on incorporating an e-card service into our site.
The customer should be able to browse through pages of available ecards that constantly rotate so that it varies upon a page refresh, also we are wanting the customer to be able to select an ecard and be able to purchase one using paypal.
All ideas and advice will be helpful
Thank you
|
|
|
June 7th, 2008, 04:39 PM
|
#2
|
|
Highly Reputable Member
SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 841
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: ecard system
There is a way through php where you can get a random image to display each time the page refreshes, would something like this help?
|
|
|
June 7th, 2008, 06:16 PM
|
#3
|
|
Reputable Member
Join Date: Feb 2008
Location: UK
Posts: 165
Thanks: 3
Thanked 4 Times in 4 Posts
Rep Altering Power: 0
|
Re: ecard system
A system with that would be great, not being a php coder myself I wouldnt know where to start.
It'd be so that the images were kinda selected randomly and placed inside set squares on the page, maybe 30 on the page at once.
The paypal setup I dont know where to start with that either, any info would be great.
|
|
|
June 7th, 2008, 06:25 PM
|
#4
|
|
Highly Reputable Member
SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 841
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: ecard system
Right, firstly name your images ecard_1.jpg, ecard_2.jpg and so on, make sure that you have the same file extension for all images, and that you don't miss a number.
Then insert the following code where-ever you want the random images to appear:
Code:
<img src="http://path_to_images/ecard_<?php echo(rand(1,10)); ?>.jpg"
width="image_width" height="image_height" alt="image_alt_text" />
You probably recognise the HTML, but are wondering what all the bit between the <? ?> brackets are.
Well this bit of php echos, or displays, a random number from 1 to 10, (change this to however many images you have). What affect this has is that every time the page refreshes a random image is displayed for the user.
http://www.allwebco-templates.com/support/S_paypal.htm
This link might help you out on setting up an account on paypal.
Hope this helps mate
Craig
|
|
|
June 7th, 2008, 06:26 PM
|
#5
|
|
Highly Reputable Member
SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 841
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: ecard system
Oh yeh, if you use any form of php make sure that your file extensions are . php, NOT . html or .htm.
Otherwise it will mess everything up majorly
|
|
|
June 7th, 2008, 06:33 PM
|
#6
|
|
Reputable Member
Join Date: Feb 2008
Location: UK
Posts: 165
Thanks: 3
Thanked 4 Times in 4 Posts
Rep Altering Power: 0
|
Re: ecard system
Thanks very much Ill look into and cheers for the code for the random image display ill post back to let you know how I get on, it may take a while though lol
|
|
|
June 7th, 2008, 06:35 PM
|
#7
|
|
Highly Reputable Member
SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 841
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: ecard system
Lol no problem, any problems just ask 
|
|
|
June 7th, 2008, 06:53 PM
|
#8
|
|
Most Reputable Member
Join Date: May 2007
Location: Cornwall, England
Posts: 1,421
Thanks: 18
Thanked 14 Times in 14 Posts
Rep Altering Power: 0
|
Re: ecard system
Quote:
Originally Posted by unitedcraig
Right, firstly name your images ecard_1.jpg, ecard_2.jpg and so on, make sure that you have the same file extension for all images, and that you don't miss a number.
Then insert the following code where-ever you want the random images to appear:
Code:
<img src="http://path_to_images/ecard_<?php echo(rand(1,10)); ?>.jpg"
width="image_width" height="image_height" alt="image_alt_text" />
You probably recognise the HTML, but are wondering what all the bit between the <? ?> brackets are.
Well this bit of php echos, or displays, a random number from 1 to 10, (change this to however many images you have). What affect this has is that every time the page refreshes a random image is displayed for the user.
http://www.allwebco-templates.com/support/S_paypal.htm
This link might help you out on setting up an account on paypal.
Hope this helps mate
Craig
|
Just to add something Craig missed, for this to work all of your images need to be called ecard_1.jpg, ecard_2,jpg, etc.
If you want it a bit more complex I could throw up a function for you, just let us know how you get on.
__________________
Yours is the Earth and everything that's in it
And - which is more - you'll be a Man my son!
|
|
|
June 7th, 2008, 07:01 PM
|
#9
|
|
Highly Reputable Member
SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 18
Posts: 841
Thanks: 0
Thanked 1 Time in 1 Post
Rep Altering Power: 0
|
Re: ecard system
Quote:
Originally Posted by unitedcraig
Right, firstly name your images ecard_1.jpg, ecard_2.jpg and so on, make sure that you have the same file extension for all images, and that you don't miss a number.
|
Think you'll find i said that mate lol 
|
|
|
June 7th, 2008, 07:03 PM
|
#10
|
|
Reputable Member
Join Date: Feb 2008
Location: UK
Posts: 165
Thanks: 3
Thanked 4 Times in 4 Posts
Rep Altering Power: 0
|
Re: ecard system
I thought craig did lol, how do you mean by more complex?
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|