39,316 Topics

Member Avatar for
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
420
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
287
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
147
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
217
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
181
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
337
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
247
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
915
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
919
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
530
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
471
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
877
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
148
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
262
Member Avatar for pawan768

Hi, I tried to generate a script which can download youtube video on server end, I only need to provide the video url ... I serached alots but <?php // Check download token if (empty($_GET['mime']) OR empty($_GET['token'])) { exit('Invalid download token 8{'); } // Set operation params $mime = filter_var($_GET['mime']); …

Member Avatar for Rahul47
0
354
Member Avatar for pawan768

Hi, I'm new with WordPress plugin development, I try to login and install a plugin with the WP user credentials without using login panel just like managewp.com people do.., they ask me for my site name,username,pwd then they automatically install their own plugin to my WordPress and one more thing …

Member Avatar for pawan768
0
317
Member Avatar for woodenduck

Hey All, I think I messed up.. I went to PhpMyAdmin and clicked export and exported all my databases with the default options to a sql file. And I downloaded a bzip file with my sql file in it. If I open the sql file it looks like BZh41AY&SYò)É<91>^@B"_<80>P^Pz÷ÿúÿÿÿðÿÿßð`4^^òPÇ»w^Fç-îä»o11ãwÞ|ú^AÜ^Aëo¨ú½Ðî^Nï:.Ó§;Såñݱèó¦ô<9b>ÓÎÞe·<92>ó»7×Ú;<98>£§Nɤ)lÓFP<94>^Tå<8b>Û^T'<86>ǭܦî°:n±@÷Þ=öõôût[Àûî÷¼>D<94>}5D7¸ÏyÕ^]zâªR<90><<9c>$P@Ð^H^B50§<94>{Th&Ò<£F<9a>^L^SLF^F<99>^@¢<9a>(hh^Y^@^F<9a>^@^@Ð^@^@^BA$^R<9e><89>詵=ªm4<99>4^Y^@^OPô<9a>h^Z^@^@^Rz©(ÔÊz£ÔñA£&<8d>© ^M^@È^M^@^@^@^H<92>^P #!4ÒzL<9a><9b>Q<99>SÄ<8d>1<88><9b>@<9e><8d>C@ …

Member Avatar for woodenduck
0
240
Member Avatar for joshmac

I am not a jquery guru in any sense, so I am seeking some help with the below code. What I am trying to do, is populate two input fields, based on what is selected from a dropdown field via a database call. When I select a term from the …

Member Avatar for joshmac
0
969
Member Avatar for ourloop

The below code displays correctly, I need an "IF" statement that prevents displaying rows with 0% in the percent column and I've tried several conditions. None are working. I only want to display rows that has at least 1% in the percent column. Here is the code: $result = mysql_query("SELECT …

Member Avatar for minitauros
0
181
Member Avatar for Rahul47

Here is my snippet for which am trying to understnad output of var_dump(). echo "<br> <br> Part2: "; $query1="select * from student"; $result=mysqli_query($con,$query1) or die(mysqli_error($con)); var_dump($result); if ($result) { $num1=mysqli_num_rows($result); var_dump($num1); echo $num1." rows affected."; } OUTPUT: ![d13507ba3998569ccd8376c851b1d753](/attachments/small/4/d13507ba3998569ccd8376c851b1d753.jpg "align-left") <---- Any explanation for this output?

Member Avatar for pritaeas
0
337
Member Avatar for cereal

Hello, I'm wondering if I can get help to understand the behaviour of a PHP function: `dns_get_record()`. This returns an array with DNS records for the given domain name, here is an example of the output: php > print_r(dns_get_record('php.net', DNS_TXT)); Array ( [0] => Array ( [host] => php.net [type] …

1
328
Member Avatar for PriteshP23

I need to develop Feedback module in PHP/MySQL. **I would like to know the database design and flow to manage this system.** > There are questions for 2 tools which i need to store in my databse and need to create report like %of Positive Response, % of Negative Response, …

Member Avatar for broj1
0
1K
Member Avatar for MWEB

Hello , everyone ! I have a question about XML & MySQL . So .. First , what I want to do : I have a Excel file ( .xml saved ) and I want to create a script that insert the XML file in MYSQL Database without any CPanel …

Member Avatar for minitauros
0
160
Member Avatar for andreiviziru

so i have followed this tutorial and i stuck into the activate section of this here's the tutorial. what went wrong? http://youhack.me/2010/04/01/building-a-registration-system-with-email-verification-in-php/comment-page-3/

Member Avatar for andreiviziru
0
347
Member Avatar for rjony321

Hi Master, I cant unlink or update my uploaded image. I can successfully upload image bt i cant use unlink function or Any body help me how can i remove / Update uploaded image. Here is my Controller: public function addProfileLogo() { $data = array(); $errors = ''; if ($_FILES['logo_image']['name'] …

Member Avatar for cereal
0
6K
Member Avatar for Rahul47

I have this following question about different behaviour of result set for SELECT command and INSERT,UPDATE,DELETE command. My Script: //Part 1: $query="Insert into student values($roll,'$name')" ; $result=mysqli_query($con,$query) or die(mysqli_error($con)); if ($result) { $num=mysqli_affected_rows($con); var_dump($num); echo $num." rows affected."; } //Part 2: $query1="select * from student"; $result=mysqli_query($con,$query1) or die(mysqli_error($con)); if ($result) …

Member Avatar for Rahul47
0
2K

The End.