php

How to check if a checkbox/ radio button is checked in php

I have this html code: <tr> <td><label><input type="text" name="id" class="DEPENDS ON info BEING student" id="example">ID</label></td> </tr> <tr> <td> <label> <input type="checkbox" name="yr" class="DEPENDS ON info BEING student"> Year</label> </td> </tr> But I don't have any idea on how do I check...

editing the NetBeans source formatting standard

Is there any way of changing the standard by which NetBeans automatically formats the code when doing "Source->Format"? I seem to remember seeing this option somewhere, but I can't find anything about it. ...

jQuery broken function after added new function

What's wrong here? The alert function was working until I added this new function to it. Is there anything I am doing wrong? It just simply doesn't fire the alert anymore. <input value="1" type="checkbox" name="salgsvilkar" id="checkbox2" style="float:left;" /> {literal} <script src="http://code.jquery.com/j...

PHP startup warning - sqlanywhere module

After a successful install of wamp server, I installed the sqlanywhere module(php-5.3.0_sqlanywhere.dll), and added it to the php.ini file as an extension. Problem is, after startup, the Wamp server throws the following error. PHP Startup: sqlanywhere: Unable to initialize module Module compiled with build ID=API20090626, TS,VC9...

How do I simplify this php script

Any suggestions on how I can simplify the php script below?This was my previous question: http://stackoverflow.com/questions/2712237/how-to-check-if-a-checkbox-radio-button-is-checked-in-php that is linked to this one, What I'm trying to do here is to output the data depending on the checkbox that is checked. But my code isn't really goo...

Value is not changing in the javascript variable on the onClick event

I am trying to implement a dynamic search jquery and php, but I am not able to change the value of a javascript variable on my onclick event. <script type="text/javascript"> var main_category = '<?php echo $main_category?>'; var main_url = '<?php echo $url?>get/' + encodeURIComponent(main_category) + '/'; var container_id = '<?php...

Alternative for composite key

hi, i have database structure where all the tables are having two columns for primary key. for an example the table Author has two columns like AutherId which is a auto increment number and the pc_id which is unique to that pc the those are the composite keys for the table. but when it comes to relations i have to define the both colum...

"Ghost" values in PHP/Smarty.

I've been working on a site for a while changing the layout and skin of a webshop checkout process. I've noticed that if you go all the way through the process until the last page, then click the link to go back to the view products page, the delivery method price displays underneath the navigation buttons, until you refresh and it goes ...

PHP and MVC, multiple models.

Hello Is it bad habit to work with multiple models in one controller action? Should it always be like one controller-one model-one view? ...

How does Symfony pass members set in an action to a template?

How does a member set inside an action... $this->foo = 'bar'; ...become a variable accessible from a template... echo $foo; // bar I would like to know how it is achieved at a framework level. There is a lot of documentation on how to use Symfony, but I've not managed to find much about how it all fits together behind the scenes (...

PHP & MySQL - saving and looping problems.

I'm new to PHP and MySQL I want a user to be able to store multiple names and there meanings in a MySQL database tables named names using PHP I will dynamically create form fields with JQuery every time a user clicks on a link so a user can enter 1 to 1,000,000 different names and there meanings which will be stored in a table called nam...

How to allow more than 2 Mb limit with PHP on a shared hosting service ?

by default PHP will not handle file uploads larger than 2MB, if one requires PHP to handle larger files then one must set upload_max_filesize and post_max_size in your php.ini file to be larger than 2MB. what alternative if one uses a shared hosting service with no access to php.ini ? ...

How to convert server time to local time?

My php file is hosted in some other part of the world. The date() and time() functions returns the date/time on the server. How do I convert that date so that it's the same as my local date/time? The date on the server is 10 hours behind my local time. I could just hard code and substract this from the server time. But what is the prope...

How to display twitter home_timeline with Oauth?

twitter API functions list please. I want to display twitter home_time using twitter tokens Eg: get_accountVerify_credentials(); ...

iCal to RSS - PHP Conversion

Im looking for a way to convert a iCal file to an RSS feed, anyone know of anything existing that could help me achieve this? ...

What is mod_php...?

Hi everybody... First of all, Pardon this complete n00b question... While going through the zend tutorial here i came across the following statement... Note that the php_flag settings in .htaccess only work if you are using mod_php. Can someone explain what that means...??? Thanks and Regards.... ...

User's Post count from specific category [Wordpress]

Hello, I want to show user's post count from specific category. Currently, I can only be able to query all posts. My code is like this <?php $userpost_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_type ='post' AND post_author = '".$curauth->ID."'");?> <?php echo "<span>Total post: </b>...

How to load file into mysql DB on a shared hosting platform?

A process running on my machine collects data from various websites and stores it in the local mysql db. Same data is exported using SELECT INTO OUTFILE and FTPed to the shared host every few hours. My hosting provider doesn't allow LOAD DATA INFILE to be executed on the shared host? What are my other options for automated/scheduled load...

Regular expression and newline

Hello guys, I have such text: <[email protected]> If you do so, please include this problem report. <[email protected]> You can delete your own text from the attached returned message. The mail system <[email protected]>: connect to *.net[82.*.86.*]: Connection timed out I have to parse email from ...

Facebook Graph API and ActionScript

I'm setting out to develop a number of Facebook applications/games, which make use of some Facebook user information and stores game info in a database backend etc, in ActionScript 3.0. How can one leverage the new Graph API Should I use JavaScript or PHP as a "middle layer" or should I go with the ActionScript Client Library? Are ther...