Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Form Filling PDF Template


I realise there is a lot written on this subject, but as a newcomer I'm
not having much luck finding a solution to my particular problem.
Grateful for your help!

I need customers to be able to enter information into a form and
receive a non-editable PDF document, by email and/or in the browser,
containing that information (with a specific layout based on a
template) after submitting the data.

I have found numerous libraries like PDFkit etc that might well do
this. I'm not sure if I can install the library onto my host server
though - is it normal to be able to do this?

There's also the Acrobat forms option. However, I need this to be fool
proof. If the client does not currently have Acrobat reader installed
on their computer, would they not be able to view the PDF form, thus
limiting accessibility? I also want to avoid FDF if possible because it
seems that, again, there's the potential for the browser not to open
the file properly, or problems if the client doesn;t already have
Acrobat reader installed.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Filling Form With Database Info
I have a table with 5 fields for a tour business activity list
: (1) id -table key (2) name (3)description (4)picture -text link not
binary(5) country. I would like to create a form that takes all the
activitys an puts it neatly down on site in checkboxes so user can
select activtys.this will be linked to form mail.i would like the
activitys to be seperated by the country they r in?

How To Shortcut Execute Php Script Without Filling Out Form?
There is a website that has two input boxes inside a POST form
that uses the action="rcon.php" here is the code for the form:

<form method=POST action="/rcon.php">
<input size=25 type=text class="sm" name="addr">
<input size=20 type=text class="sm" name="rcon">
<input class="coolbuttonblue" type=submit value="Submit">...

Data From A Form To A Template
I have a PHP script that gets data from a form and sends it to an email address. Got that working no problem. now I would like to take the data form the form and instead of just emailing it I need to put it into a template that I have created using html and tables and then emails this template to a specific email address.

External .txt Template For Form Processor
I'm in the process of customising a form processor and would like to use external .txt templates for both the primary recipient email and the client autoresponder.

For the recipient email the variable $content already contains the input data but I would like to add text to the email that is not included in this variable.

Current script config details are outlined below. If somebody could shed any light on how the form processor can be pointed to external .txt files for the body text of the emails to be sent out I'd be very grateful. Code:

Fast Template Form Sessions Query
I have a multi page form that uses sessions and mysql back end. Fast template is used to seperate the code from the html. The problem is if someone wants to go back and change something they cannot as it says page has expired. Is there anyway to prevent this happening? or to populate the input fields with what had already been entered?

Suggestions Wanted Concerning Form Handling "template"
I am devising a php page that will handle a form submission, and
wanted to know if anyone has already setup such an idea, or if you had
links to point to good tutorials on this.

Basically I have a form (which I use smarty templating to display, and
smartyvalidator to validate).

The php page basically is driven by the action variable (add,
add_confirm, edit, edit_confirm, view, delete). When the form starts
out, it is in view mode. Then if you click the add button, it switches
to add mode. Confirming a new addition sends you into add_confirm
(which would write to a DB, etc.). Edit would work the same way, except
edit mode would lookup a record to display, edit_confirm would update
that record, delete mode would delete, and view mode would basically
display data (to edit/add/delete).

Sounds easy, but my code is pretty long and I am looking to simplify
this idea. Looking for how you all do this, and if anyone has a
"template" setup to do this.

Mine would be something like:

if ($action == "view") {
// do something

..... etc ....

Repeated Filling
How do I fill up a form continously and submit it remotely? Meaning, the form info comes in from a dbase using php and gets submited to a remote site. All this happens automatically.

Zero Filling Integer
Is there a way in PHP to zero fill an integer to a specified length?
For instance, if I have a two digit number, and I want to zero fill it
to four digits, is there a PHP function I can use? Or do I manually
have to add zeros to the front?

Filling Variables From SQL
I have a dynamic dropdown menu filled with names of people that posted to the guestbook. When I select a user I want info about that user to show up (ip, when posted...)

if(in("show"))

$id = $_POST['info'];
$action = "SELECT * FROM entried  WHERE id = '$id'";
$result = mysql_query($action);

$name_info = ???
              $ip_info = ??
}

How can I fill in those variables (name_info , ip_info ) with information from SQL (fields are name , ip ...)

Filling Out Forms Through Proxies With Php
i'm connecting to the internet via a proxy, and am having problems
filling out forms... below is the code i have, and below that is the
http request i am trying to make it look like. they look the same to
me, but it isn't working, so i guess they aren't...

$proxy = fsockopen("tcp://someaddresshere", 80, $errno,
$errstr);
$temp = "somethingelse=blablabla";
fputs($proxy,"GET somesite HTTP/1.0");
fputs($proxy,"Accept: */*");
fputs($proxy,"Referer: http://someothersitesite");
fputs($proxy,"Content-Type: application/x-www-form-urlencoded");
fputs($proxy,"Content-Length: " . strlen($temp) . "");
fputs($proxy,$temp . "");
while (!feof($proxy))
print fgets($proxy);
fclose($proxy);

with that script, i don't get anything. however, with this http
request, from opera 7.10, i do:

POST http://somesite HTTP/1.0
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera
7.10 [en]
Host: somesite
Accept: text/html, image/png, image/jpeg, image/gif, image/x-xbitmap,
*/*;q=0.1
Accept-Language: en;q=1.0
Accept-Charset: windows-1252, utf-8, utf-16, iso-8859-1;q=0.6, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
Referer: http://someothersite
Proxy-Connection: close
Content-type: application/x-www-form-urlencoded
Content-length: xx

somethingelse=blablablaHTTP/1.1 200 OK
Via: 1.1 DELTANS
Connection: close
Content-Type: text/html
Date: Fri, 20 Jun 2003 17:54:37 GMT
Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12
OpenSSL/0.9.6b DAV/1.0.2 PHP/4.1.2 mod_perl/1.26
X-Powered-By: PHP/4.1.2
Set-Cookie: PHPSESSID=6c6baebea48c1ee4ad562d7fef3a46a4; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Set-Cookie: something
Set-Cookie: something

now the last part of the http request isn't a request persay, but
whatever,....

Filling An Array With A Set Of Values
i know there's a way to fill an array with a predetermined set of values (i.e. 0-999, a-z, etc) but i can't find the right syntax for the task nor find any examples.

Problem Filling An Array
I'm writing code to validate fields in a form before saving to a db. All
the validating functions are in a separate script which is required. All
the validating functions add an error message to an array if the data doesn't
validate. I check if something went wrong with count($theArray).

Here's my code:

Automated Table Filling
Ive put a whole bunch of images into MySql, and am referencing them through PHP. The code is as follows... PHP Code:

Filling MySQL Table From Within PHP
I don't seem to get the following right.

In the following I try to fill a MySQL table named 'mutation'. The first
element is a date but MySQL sees this as 0000-00-00 instead of the
date 2002-11-01. Other problem is the textstring in
$_POST['verklaring1'], in MySQL this stays empty.

<?php
$query = "insert into mutation values (2002-11-01, 1, 4, 1, 4, 10, 330 ,
' $_POST['verklaring1'] ',N,N,N,N)";
mysql_db_query("projects", $query);
?>

Filling In For Deleted Images
I am creating an image gallary where the images are numbered 1, 2, 3 etc. Users will be uploading the images so if i need to delete an image, I need the code to be able to check if that number has been deleted and replace it with the next uploaded image. I have the code pulling from a txt file with a counter to name each file.


The problem is that if images "36", "29" and "2" are removed... I need those slots to replaced in numerical order with the next uploaded images. So the next image will be named image "2" and will show up as the 2nd image on the page. Code:

Inserting A Template In A Template
I have a php page that loads a header like this PHP Code:

Dynamically Filling Selection Boxes
I was wondering if anyone knows how to fill a selection box with different values depending on a selection made in a nother selection box in the same page. I dont know if what I'm tryin to do can be done or not, at least in PHP. First a quick background:

We have a number of projects running right now, each of which is subdevided into various tasks. Now, I've got two selection boxes. The first contains a list of all current projects. What I want to do is this: when someon selects a project from the first box, I'd like the second box to be filled with a list of the tasks that have been assigned tot hat project.

Filling An Array Depending On A Variable
I want to fill an array with numbers depending on a variable.

On the page for holiday booking, the user gives the date of arrival and the date of departure, now i have written code to determine the number of days the user is staying.

Say this is 5, now i want to fill a variable with the numbers 1,2,3,4,5

If the user stays 3 days the variable should be filled with 1,2,3

I came up with this ....

Filling A Text Area With Options From A Select Tag
I read a ACCESS db table and the values from one column i use to fill a select tag (all the code is in a php file inside a iFrame tag): Code:

Efficiently & Safely (re)filling Array From $_POST
I'm using a single script to generate a table with <input>s in each row.
I fill the array with initial values, then write it out to the table
and let the user edit the values. Something like:

$myarray = $array(1, 2, 3, ... 100);
echo 'Enter your changes, then click Submit:'
foreach ($array as $i)
echo '<table tags> <input value="'.$i.'" name="index.'$i.'"> <table
tags>'

When the user clicks Submit, I need to pull the values back into the
array so I can re-display & operate on it. The data is in $_POST, which
is associative and contains stuff other than my array. $_POST contains
something like:

Submit=>submit
someVariable=>someValue
anotherVariable=>anotherValue
index1=>1
index2=>99
index3=>93.2
....
index100=>-3

After doing a quick google search, I tried:

for ($i = 0; $i < count($array); $i++)
{
$name = 'index'.$i;
$array[$i] = $_POST["$name"];
}

It runs, but I get nothing out of $_POST - those key values are unset.

Is my only option to inefficiently iterate through $_POST AND $myarray,
and doing the assignment to the proper element when I find the
corresponding name in $_POST's key?

Can I use the $_POST keys as indexes in a loop? If so, is it *safe* to
do that, and what's the syntax? Something vaguely like:

for ($i = 0, $key = index1; $i < 100 && $key < index100; $i++, $key++)
array[$i] = $_POST[$key];

PHP PDF Template
I am looking for a free or cheap, easy way to customize brocures
already in PS or PDF. Specifically, I want to replace, using a
stamping system or otherwise text and images in the brocures. I saw
PDFLib but the files are being created by designers in Adobe
Imageready and distilled to PDF...

Template
I'm trying to build a template for my site using something like this: template.html
-----------------------------
<HTML>
....
<?PHP dosomethign ?>
<MORE HTML>
$INSERTCONTENT
</HTML>
------------------------------
And while I can get it to read it all in corectally (executes the php), I am having a hard time getting it to replace the variables... I tried to modify some code from BlazeBoard... but it's not working. common.php PHP Code:

PHP Template
I am trying to have 1 template site and have an unlimited number of
websites
using this template site to call there own information.

The sites are exactly the same except for the database, each of the
sites
also needs there own URL, for example one of these urls may be
www.example1.com and the other www.example2.com. These sites are
identical
apart from the database they call to, one will call to a database
called
example1 and the other example2. I want another site (for example
www.solution.com) to read what url has been entered and to pull in the
database for that site (either example1 or example2) and show that
information. I have tried using the CURL library without success (not
sure
how to use it fully) and have tried using frames but had loads of
problems

To Template Or Not
i'm developing a website that will have an huge amount of visitors a day -->
it will be a contest with 100.000$ of prize.
I'm concerning about using a template class (and which one do you suggest)
or developing an optimized set of pages without using class nor PEAR
package.

What do you think about?
What will be your action if you'll be me?

Template?
I want to use a template for my website. A guy on another forum told me I had to use a template parser like Templatepower or Smarty.

Isn't there an easier way, just to implent a code or something?

I only want one template file and connect that one to a PHP-file with content. Then be able to change the content to content from another PHP-file when I click on a link on my site. No more functions needed.

PHP X Template
I would like to know if anybody here has used XTPL before. I have a system that a guy set up for me (he's since left the country) and this system is not IE7 compatible. I cannot get hold of him to fix it. Does anybody have any ideas on how to correct this? I've checked the XTPL website but it didn't have any info regarding IE7.

Template System
Could anyone explain the different ways there are to keeping HTML and PHP seperated?

Template Into Content
I've cleaned a whole site of 1995-era html into xhtml, but now would like to strip all its 'excess' (headers, footers, ad and spacer columns, etc) away to insert it into a php template. The thing is, I don't want to disturb the existing site map.

Would it be possible to designate a page's 'stripped content' as a variable, and call a (say, three column) template containing that variable -or in other words, have a page's content written into a called template - on the same page?

Template System
I've seen people talk about template classes and things such as Smarty and those, and I have looked at them myself and I still don't understand how they can help me. My current situation is a main page. Header, Navigation on the Left and the files are included in the center. The center files are basically tables displaying data. So if I want to let people edit the overall look, it would be rather easy. My problem is, how can I let the tables be adjusted globally.

Is it possible to do this via varibles? For instance, say I set all attributes to a varible? Example: echo '<TABLE BORDER=" '.$TABLEBORDER.' ">'

Another problem is that this is limiting...What if the user wants to use rounded tables? Then they would have to put an image in the corners of the tables. I can't allow them to edit the php file because it will be encrypted and its usually part of a While loop Example: while($row=mysql_fetch_array($sql){...

See my problem? Is there a template system that can help me?

Which Template Engine?
I'm looking for "Template" recomendations for PHP 4, like which one is
popular or has the best/most features.

I'm somewhat of a newbie with PHP and bacame interested in templates via
Wrox's Professional PHP. They were using FastTemplate. The FastTemplate
website gave me the impression it was designed around php3 and maybe hasn't
been updated in a while.

I also ran across patTemplate and Smarty.

Email Template
i need to capture the email template from mysql database, for example; the data is store in one of the field and the content look like this, so when i fire up the email it first will read the template first, then the user and the greetings and compile into an email before sending out. is it possible to do in php?

hello [user],
I just want to wish you [greetings]!
thanks,
melv

as you might see, the php need to grap data from other field and 'fill in the blank' first. so any source or guide that i can refer to?

What's The BEST PHP Template Solution?
What's the BEST PHP Template solution?

Template Looped...
My template system works by defining all variables needed, stuff like $title = " "; $content = " ";, those are defined in the file being accessed. Here is what I mean:
memberlisttemplate.php looks like: PHP Code:

Smarty Template
This code;
{if "sitethumbs/thumbs/{$user.login}.jpg"|smarty_exists}
something here
{/if}

gives me;
Parse error: parse error, unexpected T_STRING in
public_html/smarty/SmartyNoWrite.class.php(216) : eval()'d code on line 471

And this code works;
{if "sitethumbs/thumbs/name.jpg"|smarty_exists}
something here
{/if}

Template Question
My question is about templates in PHP. I know that Smarty ( URL ) is the most popular template engine out there for PHP but do you suggest another way to do this? Is it efficient? If not, what are other ways of doing it yourself without any template engines. What do you guys think of Smarty; have you done any websites using Smarty?

Template System For PHP
If you don't like to use an interpreter like Smarty to parse special markup tags(for eaxample {}) written in your templtate files and covert those to PHP, visit the following link....

Template Menu
I'm trying to decide witch way to do my menu for my program.... see some menu will be accessed by certain users with certain power... but i cant seem to decide with way to do it because... the menu is also template based ( $template = new template( menu.shtml )) anyone has done this in a way to keep the template system integrated and only show certain menus according to there users prv?

Template System
Im looking to develop a Template System that i can use in websites for my clients.I have had a look at FastTemplate, PHPLIB, and PEAR. I have also written a Template System that is sort of a hybrid of all three but, i was wondering what everyone else's views or opinions are on what features should be included in a good Template System.

Obviously the templates will reside in another file and some PHP code will call the template and replace the fields in the template with some sizzling content.

Fast Template
In the header template I have a series of nav buttons with rollovers (.gifs). I'd like to indicate which page the user is on by displaying the buttons up state on the appropiate page(s). i.e. the about us button is highlighted when on the about us page.

Creating Template And GUI?
I've been using Dreamweaver to create my php pages and love the
functionality but when I start modifying code I start wondering if I
should be something else because it always throws off the extensions.
I like the fact that dreamweaver will insert some of the tedious code
for me but are there any php GUI's that are similar to dreamweaver?
I've downloaded a few paid scripts and see the use of *.tpl files and
wonder how they design that and make it functional without using a
WYSIWYG application. From what I've found there wasn't anything like
dreamweaver for php development but it seems like I should be moving
towards creating those tpl file instead of including pieces of files.
Is there anything that will allow you to create recordset and have any
like behaviors in dreamweaver. Does anyone have any tutorial or
examples for using/creating tpl templates?

How To Create A Template?
I want to create a template for my website, but I don't want to include, header, left nav, bottom, right nav, etc etc on every single new page I make, is their a way to include all them on 1 page, and just call it template.php but make it so that I can display all the other pages content in the center of the page, without using frames. A template similar to PHP-Nuke, has left nav, header, right nav, bottom, and the content in the center, how can I go about doing this?

Template System
I've beent rying to make a template system similar to phpbb but less complicated. Could someone please help me or post a simple code for it?

Best Template Engine?
I'm in the process of writing a site and I'm using something called DTemplate, its not been updated in a while and I'm sure its not the best thing out there hence my question here.

I'm looking for a really simple template engine. I have taken a look at PHP Smarty, but its quite complex and does much more than I need it to. Also I'm not too keen on how it uses the compile directory...

I need an engine that does loops and allows me to "hide" blocks of HTML code. I don't want to be putting IF statements into my template files though. The templates need to stay really simple.

PHP Forum Template
I am trying to develop my own forum. So i would like to know if any of u guy / gal know any site that have free PHP forum template / sample for download so that i can start from there.

Custom Template
I've come across a custom templating system used by a certain company, for a project they were working on, and it has come to me for maintenance work. I couldn't find any template systems that matched this template systems, on the web. Here's a snippet of the code:

%include "adminHeader.htmlt"%
...
%ST error%<div class="errormsg">#%ERROR%#</div>%ET error%
%ST message%<div class="msg">#%MESSAGE%#</div>%ET message%

Any thoughts?

Template Systems - Which Method?
I'm looking for a good idea or ready library for templates. HTML with
PHP isn't the best solution (it's more difficult for end-users of CMS
to edit them). Perhaps, everything I need is:
- variables - e.g. {var}
- sections or conditions (some elements won't be printed out)
- loops or selecting fragments*...

Template Engine Tutorials
Is there any good / simple tutorials on how to build a template engine using php / mysql? I am having a hard time creating a template based system for each row on my database.

How To Get The Data From MySQL Into A PHP Template
I am creating a template page that will have the same subsections on each page. Each subsection is supposed to get information from a MySQL database. The subsections are: Location, Host, Cost, Travel, Age Restrictions, Work Project, Ministry Description. The variables are $locationID (primary key),$location, $host, $cost, $travel, $agerestrictions, $project, $ministry.

Now. My question is so simple. How do I get information from the database to the template based on the link (location) that the user chooses. I'm sure an "mysql_connect();" is involved, but I'm not sure how to pass the selection to the database and get the information back that I need to plug into the template.

Fast Template And Forms
Does anyone know some good documentation for fast template when it comes to interacting with forms. I am not really understanding the concept. For instance:

If I have a text box on a form and I want to fill it with what is in a database then I must say: PHP Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved