IPB

Google Frontpage Forums Unattended CD/DVD Guide
 
Reply to this topicStart new topic
> looking for some script advice
edie209
post Aug 28 2007, 09:12 AM
Post #1


Newbie


Group: Members
Posts: 33
Joined: 27-February 06
Member No.: 89274
Country Flag


I want to do two things on my web site but I really can't find the correct information.

I want to create certificates (like a swimming certificate) on my site that users can add certain details i.e. name and type of award. these could be printed or emailed

I would also like to enable sms messaging, that the user would have to pay for through the site.

thanks
Go to the top of the page
 
+Quote Post
jcarle
post Aug 28 2007, 10:33 AM
Post #2


MSFN Master
Group Icon

Group: Software Developers
Posts: 2395
Joined: 14-August 04
From: Joliette, QC
Member No.: 27580
OS: XP Pro x86
Country Flag


Both of those things require advanced programming knowledge. Are you sure you're up to it?
Go to the top of the page
 
+Quote Post
edie209
post Aug 30 2007, 07:20 AM
Post #3


Newbie


Group: Members
Posts: 33
Joined: 27-February 06
Member No.: 89274
Country Flag


To be truthful I'm not sure, but I'm not crap with computers I can program in machine code and 6502 and I have worked my way around php when I have needed to, for what its worth and I have been in IT as a systems manager since 1996 so I can learn if needed.

I just don't seem to able to find out where to start I have been searching for two weeks with no real pointers on how to go about this
Go to the top of the page
 
+Quote Post
Idontwantspam
post Aug 30 2007, 11:50 AM
Post #4


Nerd-in-Chief
******

Group: Members
Posts: 1077
Joined: 25-February 07
From: Somewhere
Member No.: 128497
OS: Server 2008 x86
Country Flag


Well, the certificates wouldn't be that hard, I don't think. What you could do is make an image with photoshop as a template, have all the borders and whatever images you want and all that on it, but leave the name, date, etc. blank. Then, have a form where they enter their name and everything, and then submit it to a page that would overlay those data over the image, using CSS positioning, and PHP to insert the data. If there are only a few things you are submitting in the form, I'd use method="get", so that they can bookmark their award and come back to it later and have everything there. Then, they could just print that page. For example:

form.php is the form.
award.php is the award.
template.png is the template image.

form.php:
CODE
<html>
<head>
<title>Form</title>
</head>
<body>
<form method="get" action="award.php">
Name: <input type="text" id="name" name="name" /><br />
Level: <input type="text" id="level" name="level" /><br />
<input type="submit" value="Make my Award" id="submit" name="submit" />
</form>
</body>
</html>


award.php:
CODE

<head>
<title>Award</title>
</head>
<body>
<img src="template.png" width="(whatever)" height="(whatever)" alt="Award" />
<div style="position: absolute; left: 110px; right: 130px; width: 300px; height: 200px; top: 400px; border: none;">
<?php echo $_GET["name"] ?>
</div>

<div style="position: absolute; left: 110px; right: 130px; width: 300px; height: 200px; top: 460px; border: none;">
<?php echo $_GET["level"] ?>
</div>

</body>
</html>


Of course, that is just an example; you'd have to customize it to how you want it, but this should give you an idea. You may want to provide a button to print, in which case you'll want a seperate stylesheet for printing which would hide that element.

Good luck, I hope this helps!! welcome.gif

And no, I don't know about your second question.
Go to the top of the page
 
+Quote Post
kacper
post Oct 25 2007, 11:46 AM
Post #5


Newbie


Group: Members
Posts: 12
Joined: 23-October 07
Member No.: 159368
OS: XP Pro x86
Country Flag


For printed stuff like certificates isn't it better to use a pdf document? Look at http://se.php.net/pdf

You can create a pdf template and fill the user info with php...

As for the secound question take a look at http://www.codewalkers.com/c/a/Miscellaneo...-SMS-Thru-HTTP/
Go to the top of the page
 
+Quote Post
Idontwantspam
post Oct 26 2007, 02:32 PM
Post #6


Nerd-in-Chief
******

Group: Members
Posts: 1077
Joined: 25-February 07
From: Somewhere
Member No.: 128497
OS: Server 2008 x86
Country Flag


QUOTE (kacper @ Oct 25 2007, 10:46 AM) *
For printed stuff like certificates isn't it better to use a pdf document? Look at http://se.php.net/pdf

You can create a pdf template and fill the user info with php...

As for the secound question take a look at http://www.codewalkers.com/c/a/Miscellaneo...-SMS-Thru-HTTP/

Good point... you could have them download a PDF with the necessary for fields and print it out.
Go to the top of the page
 
+Quote Post
geek
post Oct 28 2007, 11:38 PM
Post #7


I'm a few hundred PCs
Group Icon

Group: Super Moderator
Posts: 1172
Joined: 13-October 07
From: Oklahoma
Member No.: 158212
OS: Vista Enterprise x86
Country Flag


PHPs PDF Functions are not part of PHP and have to be installed (because their licensing conflicts with php) so getting your host to install them isnt easy
I personally use
http://html2fpdf.sourceforge.net/

the documentation sucks but basically you just add a header and a footer to your existing php code that makes the page into a pdf file
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 4th December 2008 - 11:01 AM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2008 msfn.org
Privacy Policy