php

PHP / TCPDF: Template Bug?

I have been using TCPDF for sometime. It's simple to use, outputs low size PDF and is under active development. Following is the code for a page which should only have Hello World and a footer showing page number. However I get an additional Horizontal Line at the top of the page. http://yfrog.com/2tapdfj It's bugging me. How do i get r...

PHP 5.3 CodeIgniter Gmail SMTP Timeout

I have use gmail smtp to send email from the web application that I wrote using CodeIgniter without a problems until recently. This is the snippet of my code: $config['protocol'] = 'smtp'; $config['smtp_host'] = $this->smtp_host; $config['smtp_port'] = $this->smtp_port; $config['smtp_user'] = $this->smtp_username; $config...

.htaccess File Causing JS and CSS Files From Being Called

Hi, I have an .htaccess file working in my website. I found out that javascript and CSS files are not called if the path of each of these files are not set to absolute. I changed all the URL paths to absolute in my smarty template and javascript files, and not it's working. Now in for my php files, I have require_once all over many ph...

Can keyword substitution be used for getting the revision number of the entire codebase, rather than a particular file?

Hi, I want to know that can keyword substitution method be used to know the revision number of the entire repository, instead of getting revision number for a specific file only. How can we used Keyword substitution with PHP. ...

PHP saving variables

There is a $variable, its value is a big Array(). It is created inside the function one() { ... } on the first.php page. first.php has form with method="post", after submition page reloads on second.php Is there any way to get value of $variable inside function two() { ... } on the second.php? Seems I can post value of $variable wit...

My local apache server gives pages with the php stripped out of them all of a sudden

Hi, One moment my local apache server was serving my php nicely. The next (I don't know of any settings changing in between) it doesn't serve them properly. Given a php page, it will serve the pure html that was in that page, and just strip out the php code. This tells me that something is working, although not properly, because if th...

PHP and AJAX, sending new PHP info to page for AJAX to receive, is this possible?

I'm searching on how to do this but my searches aren't turning up things that are talking about what I'm trying to do so maybe I'm not searching with the right terms or this isn't possible, but figured I would ask here for help.. this is what I am trying to do.. I have PHP scripts that are called asyncrhonously, so it is called and it j...

MYSQL: Instead of using SELECT statements in a while loop - what are my options?

I have a table which contains a list of categories and and another table which contains a list of products in each category. e.g. CatID | Cat_Name ---------------- 1 | Books 2 | CDs and ProductID | Product_Name | CatID ------------------------------------ 1 |The Bible | 1 2 |The Koran | 1 ...

Error handling Symfony custom library

Hey guys, I'm writing a library that will reside in the /lib folder that deals with processing a credit/debit card transaction. I'm using the Forms framework to accept and validate the card details and then from my actions.class.php for that module, it instantiates my custom library that deals with the SOAP call to process the transacti...

How to scrap asp.net site having search functionaity with POST data with hidden fields like VIEWSTATE,__EVENTARGUMENT,__EVENTTARGET,__EVENTVALIDATION

I am Trying to scrap the asp.net site using curl...But didn't get any serach result .... Giving error "Invalid Search Criteria" PLease Help. Thanks ...

How to use pre commit hook in SVN to return revision number of the repository?

Hi , I need to know how to use pre commit hook of svn. I need SVN revision number to be used in php files. Please guide how does pre-commit hook work. ...

How to include CSS in website developed using PHP for mobile application

Hello, I want to know how we can include CSS file in a website build using PHP for mobile application. I have a site which is build using HTML,PHP, and CSS. Now I have to make that site properly aligned in mobile phones. I already can view the content on mobile, but the css which I have included in the site is not getting added, and so ...

PHP: keeping the username in field

Hello. How do i do if i want to keep the username in the field if the users entered incorrect password, so the person doesnt need to retype the username? Should i use sessions for this? ...

Ajaxed page and Jquery

Hello, I've looked all over the web but can't find a solution. 1st I finally found a way to stop my memory leaks thanks to a guy having the same problem here on stackoverflow (and the guy who wrote the script). Now this memory leak fix is creating another problem for me. My members list is called via ajax using the fix. But I have a too...

How to properly resize large images in PHP

For a website I run, users can upload pictures they've drawn to a gallery. We create a thumbnail and a small view of that image to display to other users (clicking the small view image shows the full sized image). With this in mind, I created a very simple resize script. In most cases this script works perfectly. However, I've come a...

Delete from xml according to attribute

hi every one. My xml file is named cgal.xml <?xml version="1.0"?> <item> <name><![CDATA[<img src="event_pic/pic1.jpg" />CALENDAR]]></name> <description title="NAM ELIT AGNA, ENDRERIT SIT AMET, TINCIDUNT AC." day="13" month="8" year="2010" id="15"><![CDATA[<img src="events/preview/13p1.jpg" /><font size="8" color="#6c6e74">In Gladiat...

undefined function base_url()

Hello, Why is this line not working in constants.php :- define('FILE_UPLOAD_VIRTUAL_DIR', base_url() . '/uploads/'); base_url() works in all views. Then why not in constants.php? Thanks in advance :) ...

Include does nothing

Hi. I want to chceck files before I'll connect domain on my server. I've added them in direct admin, I've uploaded files - but I don't know how to get to them. I have 4 domains connected, but i have acces only to one. I saw that it's possible to include file from higher level include('../../panele-podlogowe.eu/adm/img/edit.gif') Tha...

Including CSS in an email sent from a task in symfony

I am attempting to send an HTML email from a symfony (1.4.6) task, I don't want to send the entire rendered HTML output from a particular module/action, so I am rendering a partial. That's all fine, the issue is that the partial contains CSS references. Is there a nice 'symfonic' way of including a CSS file in an HTML email from a symfo...

How Can I add ellisis(three dots) to my pagination?

Possible Duplicate: how to add ellipsis to pagination? how can i add ... to this pagination script (1 2 3 4 ... 14 15 16) if (isset($_GET['p'])) { $pageno = $_GET['p']; } else { $pageno = 1; } // if $query = mysql_query("SELECT count(id) FROM m3_musicblog"); $query_data = mysql_fetch_row($query); $numrows = $query_data[...