Jump to content

looking for some script advice


Recommended Posts

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

Link to comment
Share on other sites


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

Link to comment
Share on other sites

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:

<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:


<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!! :hello:

And no, I don't know about your second question.

Link to comment
Share on other sites

  • 1 month later...
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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...