Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old December 1st, 2000, 10:29 PM
trentm trentm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 0 trentm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok,

What I need to do is to beable to generate html output based on the input. I am thinking I would have to something like a if statement or something.

I am using writing this script to interface with a shopping cart the variable for all the carts data is $cart. I managed to split this data up by doing something like
($firstvalue, $secondvalue, $thirdvalue)= split (/:/,

I did this so I could edit the data and put it and send it in a html format email. But now the problem is with the html .. I have a standard way I would like the data to be displated but if I have 2 items in the cart I need to generate the html out for only those to items. If I have 15 items in the cart I need it to generate the html so all 15 items can be displayed!

Any ideas? I hope this is clear?

Reply With Quote
  #2  
Old December 2nd, 2000, 05:52 AM
kingfu kingfu is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 0 kingfu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to kingfu
the solution is extremly simple...so simple that im worried that you need to ask people to solve it for you. Im not gonna tell you because i really think your being extremly lazy and hope no-one else will so you will take the little time and effort to "learn".
have you ever read a book on programming or perl?
you should and then you wouldnt need to ask such simple questions.
you will find programming much more rewarding when you solve the problems yourself rather than getting others todo it for you and even more rewarding when you understand basic programming constructs.

Good books i can recommend are Learning Perl and Programming Perl. You can also visit the countless IT learning sites which have free books online which you can read.

Reply With Quote
  #3  
Old December 4th, 2000, 01:03 AM
udd udd is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 4 udd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to udd
That was not a very polite answer, kingfu...

Reply With Quote
  #4  
Old December 4th, 2000, 07:44 PM
tbonds
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I agree that Kingfu's response was a little rude. Anayway...

For your cart program you might want to try writing the cart items to a file, one on each line, and then use something like a "foreach $items (@items)" loop to read each line in the file, and then with each line display the item in html when the customer chooses to display the cart contents. Make sure you've read your cart file into an array like "@items" first. Then you can do just about any manipulation you want to with the data lines. This was my approach.

I'm building a cart now and know the frustrations you are experiencing. Keep at it! Make sure you have a book or two on Perl and CGI handy when writing your program. The O'Reilly books are some of the best.

Regards,


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Generate HTML OUTPUT


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway