This topic is locked

Printing and E-mail Tips needed

5/28/2009 4:04:27 PM
PHPRunner General questions
A
ashipley author

I have 2 items that are puzzling me and I could use some help.
1: My database uses a table called "Passwords" to store user names, passwords and other user data. The register and Log in Pages refer to this table for their data. I want the database to e-mail me with the new user info when someone new registers. To do this I generated the following code:
// ** Send simple email ****

$email="my e-mail address";

$message="";

$subject="New User Registration Received";
foreach($values as $field=>$value)

$message.= $field." : ".$value."\r\n";
mail($email, $subject, $message);

---------------------------

Which works fine if I use it on the "Passwords After Record Added" event when I add a new user from the Passwords Add page. The e-mail gives me all of the field names and the data entered into each field. I use this excat same code at the "Register After successful regisration" page and I get a blank e-mail So, why does the code work from Passwords Add and not Registration After successful registration?
2: I need a way to create a professional looking form that willprint directly from the net. IT seems that from the visual editor there are problems with line double line spacing, background colors and shading and close placement of lines, etc. It is hard to make a document fit a printed page properly and things such as colors to not print properly.
I have created somenice looking forms in Access and Adobe using the form generator. I would like to either create a form in PHPRunner that prints out a nice looking page directly from the net, or possible upload the adobe form and use PHPRunner to populate the fields and let adobe worry about printing out properly. Does anyone have a good suggestion as to how todo this, or a possible alternative? Right now, I am using the database to collect data and doing an EXPORT tomy computer. I have linked the exported file to ACESS and print from there, which works fine for me, but not anyone else that wants to print from the database.
I am open to suggestions.
Arthur

hfg 5/28/2009

With regard to forms. I have spent some time on this one, particularly with PDFs. I found this outside resource which is under GNU
koivi.com/fill-pdf-form-fields/tutorial.php
A lot of code adaption needs done to integrate with PHPR, but it can be done. I have not perfected it, but I have at least gotten it to work within limits. Someone that know PHP better than I could most likely make this work better then I.
I would like to see something like this part of PHPR some day as I have a lot of PDF forms.

A
ashipley author 5/28/2009

Jane:
I went and looked at the link in the post above. This looks like a good option to add to PHPRunner, where the user can build his / her own custom PDF form, import it into HPRunner, use your program to build the data interface and then upload the form and your code together It would allow a good looking input form and get matching printed output that fits properly on a page.
Arthur

J
Jane 5/29/2009

Arthur,
please see my changes below:

$email="my e-mail address";

$message="";

$subject="New User Registration Received";
foreach($userdata as $field=>$value)

$message.= $field." : ".$value."\r\n";
mail($email, $subject, $message);

A
ashipley author 5/29/2009

Well, GREAT. That was a simple fix and seems to work fine now. Thanks for the help.