Click to See Complete Forum and Search --> : please help with this code
jemerson
05-03-2003, 06:33 PM
I have a script that users can create their own webpage. I need to add 2 text boxes for users to add to it, the script now only has 1. I also want the user to be able to email thier friends & family that has a link to the site of their page, i.e., http://www.mydomain.com/members/username.html. This is the address to thier sites now but I need it in a link in the email along with a .txt file so that we may add our own "marketing" sales pitch. Can someone please help me!! The form uses mrpagemaker.cgi and I have included that file as well. I am a newbie, please be gentle. THANKS IN ADVANCE!
Jessica
Here is the html page:
jemerson
05-03-2003, 06:35 PM
OOPS I FORGOT THE CGI FILE
jeffmott
05-04-2003, 11:12 AM
That script is filled with security holes and bad programming practices. My suggest would be to read up on Perl programming (http://www.perldoc.com/) and rework the script before you toy with the finishing touches.
jemerson
05-04-2003, 11:26 AM
bad programming? Security does not need to be an issue because the content is not important. I appreciate the reply,however, I just wanted to know if what I needed could be done? Adding a simple text box and being able to have the user send their page link in an email doesn't seem that intense as far as programming, it's just a simple matter of how basic is it. The program works perfectly now, I just need to tweek it a little.
jeffmott
05-04-2003, 11:57 AM
bad programming? Security does not need to be an issue because the content is not importantSecurity is always important.
For a textbox all you need to do is print out the HTML for it.print q`<input type="text" name="name">`;while replacing the value of name to your own descriptive name (I don't know what you plan on using this field for).
To add the URL to the email you just need to add whatever URL you want to send in the same way all the other lines are printed in the Send_Email subroutine.print MAIL "Page link: $the_url_you_want_to_send\n";along with a .txt fileTo send an attachment you should use the MIME::Lite (http://search.cpan.org/author/YVES/MIME-Lite-3.01/lib/MIME/Lite.pm) module and follow the instructions in their documentation.
jemerson
05-04-2003, 12:10 PM
WHEW! I thought you were going to really get irritated with me...it's hard to get things cross when you can only type it. Well thanks! Question...when the users create this page and click "create page" the script gives them the URL automatically,i.e., http://www.domainname.com/members/usersname.html
From the "create page" how can I enter a little email form with about 5 inserts for email addresses (like a numerous "tell a friend") and the code goes into the email....did I say it right?
To add the URL to the email you just need to add whatever URL you want to send in the same way all the other lines are printed in the Send_Email subroutine.
code:--------------------------------------------------------------------------------print MAIL "Page link: $the_url_you_want_to_send\n";--------------------------------------------------------------------------------
jemerson
05-04-2003, 12:31 PM
Could you look at it for me PLEASE....I am really trying to get this finished.....deadlines.....
http://www.partytimeprinting.com/members/party/index.html
Make up a username & try & see what I am talking about. There is a paragraph to enter text "maintext" and there are 2 others below. The code now transfers everything over to the "created page"...I need to add the other 2, "maintext2" and "maintext3" so that they will also transfer over.