im trying to insert this query with mysql_query
INSERT INTO um_group_rights (`um_group_id`,`cms_usecase_id`,`um_right_id`) VALUES (2,1,1) ;
INSERT INTO um_group_rights (`um_group_id`,`cms_usecase_id`,`um_right_id`) VALUES (2,2,1) ;
INSERT INTO um_group_rights (`um_group_id`,`cms_usecase_id`,`um_right_id`) VALUES (2,3,1) ;
INSERT INTO...
How can I find out whether a float in PHP is a round number?
is_round(1.5); // false
is_round(1.0); // true
is_round(1.00000001); // false
...
Hi y'all!
I'm using the source code found on this site here: http://webtint.net/tutorials/5-star-rating-system-in-php-mysql-and-jquery/comment-page-1/#comment-2562
A fantastic resource, I think you'll all agree, but my problem is that my Javascript doesn't appear to be actually executing the PHP script...
When I add a breakpoint in Ch...
I'm trying to execute a SQL statement using the ADODB PHP library against mySQL4.1 :
$rs = $db->execute("set @name = ?; select @name", array('test'));
but it does not seem to like this.
Is it possible to use variables with prepared statements?
...
Is there a way to run a second PHP file from the first file ?
example i wam running a.php and from the foreach loop, the var is past to b.php using POST function..
...
I could use some advice.
I'm building a website in which the general user needs to be able to transfer files to the site administrator. It could be done one of two ways:
1] Some kind of web based interface - PHP perhaps - to send files to the FTP. I've done some Googling but have yet to come up with anything concrete that works. I'v...
how to sanitize user inputs that you gather by jquery .val() so you can write it in a dataString... in the example you see below when user writes
if some text that contains & the rest
of the comment doesn't seem to work
fine because it counts the rest as an
other variable to POST..
is there a sanitaziation or
serialization co...
I have a form that displays two submit buttons. The first submit button sets $form_state['storage'] to a value. The second submit button then reads this $form_state['storage'] value. If the value is set, then a success message is displayed. If the value is not set, then a fail message is displayed.
Here is the code that will reproduce m...
I'm starting out with some XML that looks like this (simplified):
<?xml version="1.0" encoding="UTF-8"?>
<alldata>
<data name="Forsetì" />
</alldata>
</xml>
But after I've parsed it with simplexml_load_string the special character (the i) becomes: ì which is obviously pretty mangled.
Is there a way to prevent this from happening?...
I am trying to get three images to connect for my content box but for some reason there is some space between the second and the third. Any help would be appreciated.
here is the site: http://hyvhuynh.com/hyperbolical-blog
<?php get_header(); ?>
<div id="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div ...
I have a file caching system for a php application. if a file needs cached i save it to a cache dir as flat html mimicking the directory structure of the request_uri
how could i check with htaccess if there is a flat file in this cache dir before continuing as normal? currently i check with php, but ideally if there is a cached file, i ...
Hi everyone!
I'm trying to figure out what would be the most efficient (with respect to load time) to compare the distance between one zip code (which the user provides) and a whole bunch of other zip codes (there's approximately 200 zip codes right now, but its subject to increase over time). I don't need anything exact just in the bal...
Here is the code
I dont know whats wrong with it.
<?php
//Logout code
//Starting Session
session_start();
//Include
include ("includes/mass.php");
//Check if the user is logged in
$username = $_SESSION['username'];
$logged_in_query = "SELECT * FROM user WHERE loggedin='1' AND ...
We have been having problems with the memcache server storing sessions data, the cache miss was about 20%, therefore we added in another pool of memcache servers, but now the cache miss rate is up to 50%. Any possible cause or solutions for this problem?
...
I'm having trouble getting this script to output a pdf for mailing labels. It throws this error:
Parse error: syntax error, unexpected $end
<?php
define('FPDF_FONTPATH','/home/directory/public_html/sub/font/');
require_once('fpdf.php');
//Connect to your database
mysql_connect("localhost", "db_user","db_pw") or
die ("Could not conn...
hi all..
I want to create a site which includes online money transaction. Site is done but online money transaction remains unsolved. well,, I dont have any idea how to implement it. can any one help me..
My requirement is to give access to my site 5 days for free... after that the user has to do the payment. paypal is about to stop pt...
Hello, I am trying to get an id value of a link with jquery then send that id to a php script (in this case sending it to a php sql query).
I have a link like this on the main page:
<a href="#" id="category1">Category One</a>
when this link is clicked, I would like jquery to grab the id value ('category1') and place it in a seperate ...
I want to populate my dropdowns with enum possible values from a DB automatically. Is this possible in MySQL?
...
What are the requirements for character escaping in the input tag's value attribute in the HTML markup?
Is it just double quotes that need to be escaped? HTML special characters as well?
I tried looking through the W3C spec, but I couldn't find any specific details on how stuff should be put into the value attribute.
I suppose it goe...
I'm creating an site which allows users to upload photos. It's a linux server.
I was wondering what would be the best directory structure to to save these images? And is there a limit of number of files a folder can have?
Would it be better to save every photo uploaded by every user to one single folder and have a reference of each i...