CSV generation in PHP Smarty
I have the PHP output, which is in table form, and I want that output in CSV format. How can I get that using PHP Smarty? ...
I have the PHP output, which is in table form, and I want that output in CSV format. How can I get that using PHP Smarty? ...
Hi Everyone! I've been on working on this for ages. I am receiving a JSON from a request to an API and unfortunately the key's of each entry is a time uuid which is in binary format. I'm trying to use json_decode() to decode the json into a PHP array. However, when I echo the string I have about 80 entries but after the decode into the...
I want to check which URL someone is currently on. For example: if(url=index.php?p=contact) { echo the code i want to run, } else { do nothing } So basically, I want to run a block of code when the user is on index.php?p=contact ...
Hi. I have a table containing persons information (one row per person) and another table containing persons photos filenames (many rows per person). I want to select a group of persons (based on another table) but only one photo per person. My old SQL was like this: SELECT persons.personID, persons.name, persons.photo_filename, movie_c...
Hi, I have a geocoding fucntion that is pulling the address values entered into a form and putting them into the geocoding call. The response is supposed to write the latitude & longitude values into the DB - unfortunately, my lat & longs are all coming back as Antarctica. Thoughts? //Set up our variables $longitude = ""; $latitude = "...
Hey there! I'm trying to select next row from current id. How can i find out my current id? $qry = mysql_query("SELECT performerid,pic0 FROM ".$table." WHERE id > $currentid ORDER BY id ASC LIMIT 1"); ...
I'm trying to use bp_group_name() in if (bp_group_name()!='General') { //code } Instead of using the value of bp_group_name() in the IF, it displays the value on the page. Sorry if the way I described this was a bit off... ...
I have a table for storing the postman coverage area. It has two fields postmanid covering_pincode What i am going to implement is, when a user enters a pincode in the textbox, the list of the postman covering that pincodes are displayed. My doubt is, how can i enter the values in the table 1. Multiple pincodes stored in single row l...
I am using Jquery dynamic form plugin to generate dynamic fields in one of the forms I have in the application. the plugin works fine and it creates the field. I am still confused on what the best way is to get the form field values. foreach ($this->input->post('product_item') as $key => $value) { foreach($value as $element) ...
When you ad a link to an image on my Wordpress 3.0.1 Network the labels appear with code as so; {#advlink_dlg.general_props} Take a look; Does anyone else have this issue/know a fix. Luckily function is not effected. Ben ...
I am new to integrating paypal with sites so maybe there's a readily available method from the service I could use? What I am trying to do is when the user clicks "return to my website", I want my return URL to know that the referrer is paypal so I can send him to the homepage automatically. How do I go about this? I tried $_SERVER['HTTP...
I'm re-writing a website that will support multiple skins. Currently, I'm just planning on allowing images and CSS to be modified, but the underlying HTML will not change. And if the skin does not modify an image or CSS file, it inherits that file from the base skin. With that in mind, here are the 3 ways I've considered so far for se...
I'm designing a website for an organization that's a state chapter of a national organization. The national organization has implemented a member login that I need to use for the state website. My website is in PHP, and it looks like the server for the national organization is using SOAP and ColdFusion. I'm a total newbie to using SOAP...
Ok so i have a html form, 10 files get uploaded. 6 images and 4 pdf. some of theses files are required others not. My problem is when my script verifys the data and retuns to the user that he/she has errors all the file inputs are come back as blank... and if the user re-submitts... the files are not saved. This form has other fields o...
Hello all, I design a form that contains dynamic contents. For example, The form has a textfield for Paper_Name and a textfield for Paper_Link. The user can add up to ten paper names and paper links. The id for each paper name and paper link is as follows: papername01, paperlink01, ..., papername10, paperlink10. Those ids are dynami...
I have one drop down box,which represents company name.I want another drop down box depending on company selected,which represent project for that particular company. Can any 1 help me out. Here's the code <tr><td align="right" valign="top" style="text-align:right"><strong>Company:</strong></td> <td align="left" valign="top...
I'm using Zend framework and trying to get the results to be in a random order. This returns the results but doesn't seem to vary the order. Any ideas? class Model_DBTable_Tblquotes extends Zend_Db_Table { public function getQuotes() { $select = $this->select(); $select->setIntegrityCheck(false) ->from(...
There are tons of PHP frameworks out there; some are pretty decent, others seem bloated and unnecessary. After watching Rasmus Lerdorf's presentation on PHP performance at Digg, I'm somewhat more concerned about the performance of the frameworks that I choose for building my applications with. Two of the most popular frameworks that I'm...
Hi I'm sure this is possible in php. I have several css files located in a folder on my server. I wish to list these files in a drop down menu located on a php page. When the user selects one of these files in the dropdown, a textarea on the same page is populated with the source code of that css file. Struggling with this one, any he...
I have a multi value cck field. I can read any single id with node->field_multip[0][id]. How do I read all ids? I tried a for loop with field_multip.length but the page never finishes loading. What's the right way of doing this? field_multip [0] [id] [sec] [1] [id] [sec] [2] [id] [sec] ...