php

PHP on windows environment Vista

Do I need a special library to run PHP on Windows environment Vista? I can write simple message like echo "hello" but whenever I try to run any these scripts no error nothing display on the page http://php.net/manual/en/function.crypt.php. I'm new to PHP please help ...

php product browser

Howdy, I was wondering if anyone knows of a good script to manage a catalog of products. Just need basic stuff, like being able to browse by category and or tags and search. Without many extras, as I'd like to have it working inside a CMS. softpedia has a few scripts, but I'm also considering creating it from scratch. Ideal would be som...

Apache wildcard setup -> php script -> htaccess ->scripts... ?

I have apache setup to wildcard direct all unknown trafic to one php script (default documentroot). This php script looks into a database and possibly finds the correct documentroot for the requested domain (or documetroot of the 404 error handler etc..). The problem is, that from within php script I know how to include another script,...

jquery Help with getting Id of table row

Hello, I am doing an AJAX request with Jquery and PHP what I am doing is looping through an array and producing a table, each loop a new is created and an id is given to it, when they click the read me link the ajax and some more content is returned, on clicking read more I want the associated table row to be removed from the table is th...

Keep values selected after form submission

<form method="get" action=""> <select name="name"> <option value="a">a</option> <option value="b">b</option> </select> <select name="location"> <option value="x">x</option> <option value="y">y</option> </select> <input type="submit" value="Submit" class="submit" /> </form> On submitting the form, ...

Fetch posts starting with alphabet [x]

<?php $temp_query = $wp_query; ?> <?php query_posts('tag=sometag,anothertag&posts_per_page=10'); ?> <?php while (have_posts()) : the_post(); ?> // print post here <?php endwhile; ?> <?php $wp_query = $temp_query; ?> Using this simple wordpress loop, how do I show ONLY the posts (post titles actually) starting with say letter 'G'. I...

Send code from page to php script

Hi. I have a html page with javascript which change the content of page and I want to send the new content to php script? How can I make this? ...

PHP ODBC - Access 2007: Function Call Problems: odbc_columns

Hello all, I have mananed to use the odbc_connect like the following for access 2007 and 2003 and I can get data. But when I try to get the column names the following function will not work for access 2007 but will for acccess 2003 - why? if($type[1]=='mdb'){ $connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq...

Automated sitemap in CakePHP

I'm following this tutorial for creating automated sitemaps in CakePHP. Everything is easy, but I'm not able to output XML. The controller looks like function sitemap () { Configure::write ('debug', 0); $cats = $this->Category->find('all', array('fields' => array('nicename', 'modified')), null, -1); $posts = $this->Post->fin...

double quotes makes text dissappear, why?

Whenever the texts value has double-quotes, everything behind and including the double-quotes dissappear. Ex: Nice bmw m3 with 19" wheels BECOMES Nice bmw m3 with 19 the part after the double-quotes is skipped. Is there anyway around this? About the code below: This is for a form on a php page, so when the form is submitted to itself ...

how to create an ajax pop pulling a data from db ?

Hi, can someone tell me how to create a nice small tooltip like ajax pop-up ? the situation is like this, I am pulling the $row->title from the db, and then I presented it as a link like this <?php foreach($task->result() as $row): ?> <tr> <td><a href=#><?php echo $row->title; ?></a></td> </tr> <?php endforeach; ?> wh...

Changelog file: YAML vs JSON vs CSV

Hello everybody. I am creating a simple Changelog lib in CodeIgniter that will basically log a message everytime someone adds, deletes, changes or publish a blog post. I will log messages in files by batches of 300. So every 301st message will go in a new file. At first I wanted to write the logs to simple .log files but then I got the ...

Concatenate values of n arrays in php

I have an unknown number of arrays, each containing an unknown number of words. I want to concatenate the values from each list so that all possible variations of the words are stored to a final array. For example, if array 1 contains: dog cat and array 2 contains: food tooth and array 3 contains: car bike I'd like the output t...

Why do links on my transparent div become unclickable in IE?

Links on my website: http://rnmtest.co.uk/oddfellows/ If you hit 'Dine' you should see a 'Book Now' button. This element is not clickable in IE. The area below it has a semi-transparent png as the background. The content is loaded via jQuery. I have put the anchor within a container div as recommended by other websites, but this has...

Symfony + Doctrine - possible to link more than 2 tables/models together?

I've created an sfGuardUserProfile model that has a relation to the sfGuardUser model. Then I define another model with a relation to sfGuardUserProfile. I don't get any errors when I create the database, but when I try saving data to sfGuardUserProfile in my actions file, I get this error: SQLSTATE[23000]: Integrity constraint viola...

Zend_Router... Zend_Form... Mod_Rewrite... Rewrite URL get value pairs to slashes...

I am submitting a normal <form method="get"> element to the current url... It's part of a search page. The resulting url is below. http://domain.com/module/controller/action/get1/value1/?get2=get2&amp;value3=value3 The problem is I am using <?= $this->url(array('page' => x)); ?> and similar to navigate around but I want to retain the $_...

Pear error messages with PHP5.3.0

Hi! The shit really hits the fan when i Open up a newly installed PEAR package on a WAMP server. Here's the error messages. What can i do? Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\PEAR\PEAR\Config.php on line 650 Deprecated: Assigning the return value of new by reference is deprecated i...

parsing textarea input with PHP as if its a csv?

hey all i'm trying to make a site where people paste a CSV file directly into a textarea (say its called "original-text") and parse it, with my script then generating something from that. i know how to parse a csv file on the server (using fgetcsv) but not how to get the input from a POST variable INTO that fgetcsv. so far i've tried som...

MySQL - Fetch rows where a field value is less than 5 chars

I need to fetch all the rows where the 'zip' field is less than 5 characters. How can I achieve this using only SQL? I google'd first, but only found info on CHAR_LENGTH(). ie, psudeo code: SELECT * FROM users WHERE STRLEN(zip_code) < 5 Thanks! ...

Modify SQL SELECT statement with PHP

How best to alter a SQL SELECT statment's field list to a COUNT(*) using PHP? e.g SELECT blah, blah, blah FROM tbl_blah WHERE blah; to SELECT COUNT(*) FROM tbl_blah WHERE blah I have considered mysql_num_rows... but I am pretty sure it would be more efficient to edit the statement. I am guessing it could be solved with a regex expr...