39,326 Topics

Member Avatar for
Member Avatar for Dani

This seems kinda random but basically I have the following member function in my caching class: public function increment($key, $expires = 0) { // Requires OPT_BINARY_PROTOCOL return $this->cache->increment($key, 1, 0, $expires); } So then I want to do flood protection like this: $cache->increment('foo', 10) > 50 90% of the time …

Member Avatar for LastMitch
0
429
Member Avatar for amit.chaudhari.71

i have download php 5.3.27 windows installer from php.net then i download apache 2.4.4 windows installer from apache site. now i have successfuly installed apache 2.4.4. to check this i have write` http://localhost/` on the address bar and the out put is "its work". now the step to install php …

Member Avatar for veedeoo
0
6K
Member Avatar for dlmagers

Hello, everyone I am going to get right to the point. I am trying to create this index.php with a discounted display of the calculation. Here is my display.php page code. I have your classic $product_description, $list_price, and $discount_present. I think it might be working well the only problem that …

Member Avatar for broj1
0
376
Member Avatar for adishardis

Hi, I have a table and I want to create a field to show whether it's the first occurrence (has the oldest date) of the id in that table. the table looks something like this and it's the last field I need help with creating a update code for. ----id----date_of_trans------custom_id--------cust_type----- …

Member Avatar for broj1
0
186
Member Avatar for kyle.santelices.31

hello kindly help , i have a login.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Login Form</title> <link rel="stylesheet" href="css/loginstyle.css" type="text/css" /> </head> <body> <div id="main-form"> <form name="form1" method="post" action="checklogin.php"> <input name="username" type="text" id="myusername"> <input name="password" type="password" id="mypassword"> <input type="submit" name="Submit" value="Login"> </form> …

Member Avatar for kyle.santelices.31
0
2K
Member Avatar for devianleong
Member Avatar for pritaeas
0
143
Member Avatar for adams2887

hi i am trying to upload an image but it doesn't work I have been trying for ages but without any luck. I was wondering if anyone would be kindly enough to take a look at it. Basicly i'm getting my echo error message "problem uploading image" displayed constantly, even …

Member Avatar for Raju_3
0
726
Member Avatar for devianleong

Here is my array: $a = array( “1” => “3”, “1” => “2”, “2” => “1”, “1” => “2”, “2” => “2”, ); and my expected output is : 1 = 7 , 2 = 3 How can I do that in foreach?

Member Avatar for pritaeas
0
14K
Member Avatar for calebcook

I'm using a plugin called [jQuery file upload](http://blueimp.github.io/jQuery-File-Upload/) to upload images to a page. Currently it uploads with the original image name as the file name (IMG_1234). I need a specific format for the image name on the server (eg 1.123456.jpg) I found this PHP code that works for changing …

Member Avatar for LastMitch
0
428
Member Avatar for klemme

Hi All, I get fsockopen warnings using drupals webform. Not my CMS, but am pretty sure nothing basic has been modyfied. I have attached screendump of error here in this msg. (Well, I wanted to but seems they have removed that feature?) Only thing is that i have disabeld smtp …

Member Avatar for LastMitch
0
152
Member Avatar for jannat1

I am trying to populate dropdown list according to other dropdown list using ajax prototype.js framework.But its seems ajax observField function is not picking the change in first dropdown list . I have two tables named mobiles and moddels moddels table has an coloumn mobile_id for association. my models are …

Member Avatar for LastMitch
1
383
Member Avatar for Rachael_1

Hi, I would like to have my pop-up(upon clicking create order) to be visible even after an error msg appears. How can I do it? <?php $selection = ''; $type = ''; $size = ''; $bidprice = ''; $offerprice = ''; $stoploss = NULL; $takeprofit = ''; //////////////////////////////// $Error = …

Member Avatar for LastMitch
0
269
Member Avatar for dfaulted

I'm testing my script in PHP 5.5, works perfectly until I switch from MySQL to MySQLi. Error: Stack trace: #0 C:\xampp\htdocs\url_rewrite.php(52): tep_db_fetch_array(NULL) #1 C:\xampp\htdocs\url_rewrite.php(106): transform_uri(Array) #2 [internal function]: wrap_href(Array) #3 C:\xampp\htdocs\url_rewrite.php(12): preg_replace_callback('/(<[Aa][ ???]{1...', 'wrap_href', '<!DOCTYPE html>...') #4 [internal function]: callback('<!DOCTYPE html>...', 9) #5 {main} Line 52 of url_rewrite: $cat_Q = …

Member Avatar for dfaulted
0
422
Member Avatar for gurungb03

I am a 3rd yr student and I have to do a FYP project. So guys can you please suggest topics that come across your mind( projects that you would do as your FYP). I am planning to make it web based system using HTML/CSS, PHP and the duration for …

Member Avatar for diafol
0
288
Member Avatar for andreiviziru

I have a script that registers users and i want to implement in it this function to make for each user a folder with the name they supply so i used $user_folder = mkdir($_SERVER['HTTP_HOST'].'/user/'.$name, 0755); $name is the name they supplyed in the form so i get this "Warning: mkdir() …

Member Avatar for devianleong
0
148
Member Avatar for andreiviziru

so i have the following code and is not working // Make user folder if (!is_dir('../user/'.$name)) { $user_folder = mkdir('../user/'.$name, 0777); $user_index = copy('../login/user.php', '../user/'.$name.'/index.php'); if ($handle_append = fopen('../user'.$name.'index.php', 'w')) { echo 'Succes opening the file'; } else { echo 'Error opening the file'; die(); } $string = 'text to …

Member Avatar for andreiviziru
0
220
Member Avatar for pritaeas

The following snippet shows how you can use binding in your queries when using PDO. For starters, here's the table structure I've used: CREATE TABLE `mytable` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `dob` date DEFAULT NULL, `level` int(11) DEFAULT NULL, PRIMARY …

3
1K
Member Avatar for NitsPatel

hello, My Plugins are in the Plugins Directory Plugin name is `acf-cf7`. and I include file in functions.php file like `include_once('acf-cf7/acf-cf7.php');` So, how i give Path in **include_once('acf-cf7/acf-cf7.php');** please give me suggestions thanks in advance

Member Avatar for NitsPatel
0
182
Member Avatar for saravananosiz

i need to convert this following data to graph how can i convert this data in php uri:/instrument/1.0/GOOG/chartdata;type=quote;range=5d/csv/ ticker:goog unit:MIN timezone:EDT currency:USD gmtoffset:-14400 previous_close:848.5500 range:20130823,1377264600,1377288000 range:20130826,1377523800,1377547200 range:20130827,1377610200,1377633600 range:20130828,1377696600,1377720000 range:20130829,1377783000,1377806400 Timestamp:1377264600,1377806400 labels:1377264600,1377523800,1377610200,1377696600,1377783000 values:Timestamp,close,high,low,open,volume close:848.1600,876.3100 high:848.5500,877.3462 low:847.7700,875.4200 open:848.1700,876.4000 volume:0,219200 1377264898,876.3100,877.3462,875.0100,875.0100,72300 1377265162,875.5900,876.4500,875.4200,876.4000,23000 1377265495,873.5620,876.0300,873.5601,875.7300,20200 1377265786,873.5400,874.4200,873.0201,873.5100,32100 1377266090,873.3450,873.5100,872.3800,873.4900,22800 1377266399,872.0500,873.2600,871.6400,873.2600,20100 1377266678,871.9100,872.0100,870.5501,871.7100,26600 1377266986,871.7200,871.7200,870.5460,870.9700,9700 1377267296,872.5100,872.8700,870.4700,871.6150,19900 1377267599,871.9920,872.6900,871.7100,872.6700,17600 1377267882,871.7500,872.5000,871.2400,872.2700,6700 1377268197,872.6290,872.9929,871.6200,871.9400,18600 1377268497,872.3000,873.0490,872.2900,872.4450,14200 …

Member Avatar for saravananosiz
0
341
Member Avatar for websponge

Hi, I have a large monitor at work on the wall, and I want to display some simple information, I have set up WAMP on my desk PC, I want to enter information on my desk PC and submit that data, and it displays on the main screen, I have …

Member Avatar for websponge
0
250
Member Avatar for devianleong

Hi, I'm developing a mall script.Here is the senario. When user add item to the cart the session will store product ID. THen I've some function to display product name, price, merchant id & etc from product ID parameter. Now I want to get a shipping price base on the …

Member Avatar for pritaeas
0
168
Member Avatar for jessie.wauters.1

Same kind of problem here :( I was trying to solve a problem with Ajax Calender by pasting this code at the buttom in functions.php of my theme Twenty Eleven: <?php if ( get_magic_quotes_gpc() ) { $_POST = array_map( 'stripslashes_deep', $_POST ); $_GET = array_map( 'stripslashes_deep', $_GET ); $_COOKIE = …

Member Avatar for aVar++
-1
141
Member Avatar for salii

I have a problem with php. I was trying to change my homepage on theme twentyeleven. Its a beginning of my functions.php script. Syntax error, unexpected T_IF is on line 1. Could you help me to find out whats the problem? <?php/** * Twenty Eleven functions and definitions * * …

Member Avatar for jessie.wauters.1
0
1K
Member Avatar for lloydsbackyard

will anybody please help me with this code..since it will give me this error: FPDF error: Some data has already been output, can't send PDF file... my php code below: <form method="POST" action=""> <input type="submit" name="print"value="PRINT"> </form> <?php if (isset($_POST['print'])) { require('fpdf/fpdf.php'); class PDF extends FPDF { // Page header …

Member Avatar for lloydsbackyard
0
918
Member Avatar for sammry

am trying to show assigned variable for failed submission on a smarty form. array assigned as $arr = array($_POST[number]); $smarty->assign(number,$arr); and on tpl form, i added as below. {foreach from=$number item=no} <input name="number[]" type="text" value="{$no[{counter start=1}]}" /> {/foreach} am starting the counter from 1 because this is for dynamically added …

Member Avatar for sammry
0
921
Member Avatar for jotapx

Hey! I am a newbie to php, but very interested in. I am currently on highschool and i am trying to make an appointment SQL table that could be managed, in a simple way, via browser that my sister could use. I was getting some results but then i messed …

Member Avatar for EvolutionFallen
0
532
Member Avatar for Kim_2

Here is the error I am getting: Parse error: syntax error, unexpected T_STRING in /html/gallery/1BDres1.jpg on line 96 Where would I begin to look for this code? I had a programmer working on this site, but he left me high and dry with very little knowledge of php...I can usually …

Member Avatar for EvolutionFallen
0
473
Member Avatar for Dani

Receiving this CodeIgniter message in my error log every so often (and by every so often I mean quite often): ERROR - 2013-07-21 07:26:40 --> Severity: Notice --> unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 124 of 187 bytes /home/daniweb/httpdocs/system/libraries/Session.php 724 Could a problem unserializing() be caused by a session cookie …

Member Avatar for Dani
0
882
Member Avatar for minitauros

**The text:** `<form action="ajaxa/login" method="post" class="odf_ajax loading_image_left" data-target="ajax_login_form">` **The regex (to find the form's action):** `$regex = '/<form.+?action="(.+?)"/i';` **The expected result:** `Array (2): [0] => '<form action="ajaxa/login"', [1] => 'ajaxa/login'` **The actual result:** `Array (1): [0] => 'ajaxa/login'` Can anyone help me explain why this regex is not returning the …

Member Avatar for minitauros
0
149
Member Avatar for Monica_1

Im working with dreamweaver, coded in php On one of my pages, i'm trying to add 2 different print buttons each one printing a differrent portion of the webpage. For example, one print button is printing the first paragraph and the other print button is printting the second paragraph. I …

Member Avatar for pritaeas
0
264

The End.