Hello Guys,
Im using pdflib for generating pdf, It is working fine, when I used a single page pdf as the template, but when I use a pdf with two pages I dont know how to write in first page and second page
$page = PDF_open_pdi_pa ge($p, $blockcontainer , 2, ""); // I have set the pdf points to second page
Here in the above line, I have set the pdf to write in second page, but I dont know how to...
User Profile
Collapse
-
PDF Generation using PDFLIB
-
How to open ppt in Firefox
I have a ppt that needs to be loaded in the new window when the users clicks on the button, The new window has a iframe , the ppt has to be loaded in the new window. I can do this in IE, but when i try the same in Firefox the ppt and the iframe is loaded inside the firefox. can anyone guide me to sort out this.
Thanks in advance. -
How to write a array in the cookie
Hello Guys,
Hope u all are doing great. Canyou suggest me how to write a array in the cookie, for eg,
[php]
$var = array("1","2"," 3");
[/php]
Now I want to set a cookie which should store this array $var. I dont want to use for loop for storing the array value in the cookie
Can anyone help me............... -
This will give you the working directory, so you can use this, hope this is helpfull to you
[php]
$fetch = $_SERVER["PHP_SELF"];
$expval = explode("/",$fetch);
$fcnt = count($expval);
$fval = $expval[$fcnt-2];
$workingDir = $fval;
[/php] -
Multipart/Form-data is used when you have an inputfile control in your form, basically it is to facilitate that upload of binary data.
Enctype (encoding type) specifies the media type of the underlying data....Leave a comment:
-
Try this, the problem is you have established the db connection inside the if condition, so its pops up the db error, now i have made it availabe in the top, and also there is no need to pass the connection string in the mysql_query.
<?
$conn = mysql_connect(" localhost", "XXXXX", "XXXXX") or die("Connect error: " . $msg_no_connect );
mysql_select_db ("rickou81_surv eydb") or...Leave a comment:
-
I think you forgot to add enctype="multip art/form-data" in the form , thats why you the function always returned false, try this.
<form action="" method="POST" enctype="multip art/form-data">
<input type="file" name="sfile" id="sfile">
<input type="submit" name="submit" value="submit">
</form...Leave a comment:
-
I have modified the Ronald code in such a way that the company name comes from the database.here is the code, get back to me in case of any issues.
RAJI20: You should know better then displaying code without the tags! Before you do this the next time read the Posting Guidelines!
[php]
<?
if (isset($_POST['company'])) {
$company = htmlentities(tr im($_POST['company']));
$conn = mysql_connect(S QL_HOST,...Leave a comment:
-
the name of file/folder which you are trying to create already exists
This is the code which i have used to create a dir, it works for me
$targetpath = "/www/htdocs/phpdocs/Practice/";
$target = $targetpath . "dirToBeCreated ";
mkdir($target,0 777);...Leave a comment:
-
is_uploaded_fil e function is available for ,
(PHP 3 >= 3.0.17, PHP 4 >= 4.0.3, PHP 5)...Leave a comment:
-
Cron Job
I want to make the script to run automatically everyday that checks for the new emails, if any new mails are there, it need to forward to the specified address. I need this to be via CRON JOB, how to do this, any help will be greatly appreciable. -
The name of the form is not passed with the form collection. So, if you have multiple forms pointing to the same page, you can do one of several things:
1. Include the name of the form in a hidden input field within each form.
2. Use different submit buttons, and check for the presence of each in the target page.
3. Use a hidden element in each form that will go to the same page,...Leave a comment:
-
Whenever the user enters the site, he/she might be adding products to the shopping cart at that time you need to assign the session id (session_id ) or currernt time() as the cart id and this will be stored in the session value, say $_SESSION["CART_ID"],
Now you'll be insetring a new record in the products table each time whenever user clicks on the add to cart, with the session cart id ($_SESSION["CART_ID"]) maintaing...Leave a comment:
-
yes it will be better if you change the table structure, so that it can have the foriegn key as the user's id in the product table...Leave a comment:
-
open the php.ini file and then check whether the save path is specified , this is the line which you'll find in the php.ini
session.save_pa th = "c:/wamp/tmp";...Leave a comment:
-
Use a where condition in the select query where you display the records
For eg, if the user with the id #2 is logged in , put this id in the session, then the qry will be as
$sql = mysql_query("se lect * from tableName where id = '".$_SESSION["id"]."'") or die(mysql_error ()) ;
you need to make sure that the product table has the foriegn key which is the primary key...Leave a comment:
-
-
YOU ARE URGED TO USE THE code OR php TAGS WHEN POSTING CODE!!!!
[php]
<?php
mysql_connect(" hostname","user name","password ");
mysql_select_db ("databasename" );
$firstQry = mysql_query("se lect * from table1") or die(mysql_error ()); // table 1
//////After getting the id from the table1 supply that posted id to get the resuls from the table2 //////////////...Leave a comment:
-
[CLOSED] how to install font when the page is getting accessed
This is my issue,
I have a PHP page in my server that shows chinese font, so whenever the uses access the page, I need to check whether the chinese font is installed in the system, and if not it should make the user to install the chinese font.
Iam using PHP,MYSQL, APACHE, and PHP(4.3.10) -
This is the code iam using,Code:<?php if(isset($_POST["test"])){ print_r($_FILES); } ?> <form name="frmImg" method="post" enctype="multipart/form-data"> <input type="File" name="assetUpload"> <input type="submit" name="test"> </form>
Leave a comment:
No activity results to display
Show More
Leave a comment: