39,323 Topics

Member Avatar for
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
338
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
330
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
688
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
Member Avatar for reececropley

Hi, I have a extension in my opencart store that uses a .csv file to import data into products. The .csv file is a stock inventory list from a tyre manufacturer. The extension uses a string value of the image filepath that get inserted into the database. The issue I …

Member Avatar for reececropley
0
449
Member Avatar for 1baga

i have a problem with this website after i added this piece of code to the .htaccess file #Rewrite .php to .html RewriteEngine on RewriteBase / RewriteCond %{THE_REQUEST} (.*)\.php RewriteRule ^(.*)\.php $1.html [R=301,L] the code was suppose to rewrite all the name of my pages that ends with .php to …

Member Avatar for diafol
0
231
Member Avatar for Aiedail

Hello, So I am a php novice. The company I work for has been getting a lot of spam via our contact form lately so I need to secure it, which I have done with adding a hidden field that if the form is autofilled it will not send. But …

Member Avatar for diafol
0
1K
Member Avatar for Rahul47

A simple login script that won't be much trouble for members in here. But query within is getting fired up for wrong credentials. My Script. <?php require("C:\wamp\www\Onex\connect_db.php"); if(isset($_POST['login']) && !empty($_POST['login'])) { $uname=$_POST['uname']; $pass=$_POST['pass']; $login_query="select * from register where username='$uname' and password='$pass'"; $result=mysqli_query($con,$login_query); if($result) { echo "Login granted. <br>"; while($row=mysqli_fetch_array($result)) { …

Member Avatar for broj1
0
213
Member Avatar for everton.retweets

Hi Everyone. I have the follwing htaccess file working just great. Basically it rewrites .php to .html and also rewrites none www. urls to www. My question is how can is remove a directory from the .php to .html rewrite rule? My pages are correctly being rewritten to .html files, …

Member Avatar for everton.retweets
0
255
Member Avatar for Dani

My code looks like this: if (!empty($foo)) { $doc = new DOMDocument(); $doc->loadHTML($foo); $images = $doc->getElementsByTagName('img'); } And this is happening: DOMDocument::loadHTML() [<a href='domdocument.loadhtml'>domdocument.loadhtml</a>]: Document is empty in Entity, line: 2

Member Avatar for Dani
0
126
Member Avatar for subrata_ushasi

Hi , I am creating a search page where searching from databaes against a field .From the string "**Birdnesting is the common hobby with the English boys**.And boys are playing in the ground .Again the boys are playing in the ground. **But Birdnesting is not a cake** . " if …

Member Avatar for flashhtml5
0
166
Member Avatar for NitsPatel

hello images not display in live server when uploading from localhost to live server. It is properly work in local server thanks in advance

Member Avatar for bradly.spicer
0
158
Member Avatar for nira9

i just wanted to know for future which language is good php or java thanku..:)

Member Avatar for stevie.whalen
0
264
Member Avatar for davy_yg

Hello, How to create advertising pop up that appears like this : [Agent Ads](http://www.indovision.tv/) at the very first time users opening the homepage.

Member Avatar for bradly.spicer
0
53
Member Avatar for Saleh_1

I want to make user profile picture who only have account. But I dont know how to insert and display in the page that image form database, please support.

Member Avatar for IIM
0
139
Member Avatar for 123bsn

user 'Logout' is not working in my website after migrating to new server. before it was good. here is the code in member.php // Log-out part if (isset($_GET['logout'])){ $pass = ""; setcookie ("pwd","",time()-3600); $pwd = ""; setcookie("name","",time()-3600); $name=""; setcookie("type","",time()-3600); $type=""; header("Location: member.php"); } Looking for help Thank you

Member Avatar for Saleh_1
0
147
Member Avatar for PF2G

Hi, I'm trying to substract the hours of the time with the hours of the begining of an event, and print how many time is left. Can someone help me? //Preço Viagens $partida=$viagens['HoraPartida']; $horapartida = explode(":", $partida); echo $horapartida[0]; $horasistema = date("G"); //hora sistema $difhoras=$horasistema - $horapartida;

Member Avatar for flashhtml5
0
112
Member Avatar for ehpratah

Hi i have this query that search data between two date range `select RA, Name, Model, Plate, Service, Grand_total, Payment_type from advance WHERE SDate BETWEEN '" . $from . "' AND '" . $to . "' ORDER BY Payment_type` which is working great but i need to alter it so …

Member Avatar for ehpratah
0
161
Member Avatar for lewashby

I can not get a page to load from the following php program. When I load the page in the browser all I get is a blank white page. I also looked in the /var/log/apache2/error.log file and found this line -> [Sun Aug 25 21:36:37 2013] [error] [client 127.0.0.1] PHP …

Member Avatar for pritaeas
0
276
Member Avatar for Siberian

<?php // PHP script to allow periodic cPanel backups automatically, optionally to a remote FTP server. // This script contains passwords. KEEP ACCESS TO THIS FILE SECURE! (place it in your home dir, not /www/) // ********* THE FOLLOWING ITEMS NEED TO BE CONFIGURED ********* // Info required for cPanel …

Member Avatar for Siberian
0
382
Member Avatar for andreiviziru

so i have the following script: <?php /** * * @Create Breadcrumbs Trail. * * @copyright Copyright (C) 2008 PHPRO.ORG. All rights reserved. * * @version //autogentag// * * @license new bsd http://www.opensource.org/licenses/bsd-license.php * * @filesource * * @package Breadcrumbs * * @Author Kevin Waterson * */ class breadcrumbs{ /* …

Member Avatar for andreiviziru
0
248
Member Avatar for GlenRogers

Im trying to pass a session variable $_SESSION['id'] form one page to another. But in the page im trying to pass it to I get this error Undefined index id The pages are in different dirs but in the same parent dir obviously, would this have anything to do with …

Member Avatar for mmcdonald
0
168
Member Avatar for leokuz

In MySQL I have created database "[B][COLOR="Red"]mydata[/COLOR][/B]" with the table "[B][COLOR="red"]contacts[/COLOR][/B]". The fields are as follow: [B][COLOR="green"]ID[/COLOR][/B] (Primary Key) (INT(10) [B][COLOR="green"]Name[/COLOR][/B] VARCHAR(45) [B][COLOR="green"]Title[/COLOR][/B] VARCHAR(45) [B][COLOR="green"]Address[/COLOR][/B] VARCHAR(45) [B][COLOR="Green"]Comments[/COLOR][/B] TEXT Based on info at [url]http://www.webmasterforums.com/php-development/1683-php-form-entering-data-mysql-database.html[/url] I have created following two files: [B][COLOR="green"][COLOR="Red"]new_record.php[/COLOR][/COLOR][/B] [CODE]<? $usr = "myusername"; $pwd = "mypassword"; $db = "mydata"; …

Member Avatar for Rahul47
0
289
Member Avatar for kanoy83

Hi guys, I have a simple php script to upload file. I'm having some problem in creating confirmation before overwriting the file from new file upload. Situation: 1. confirm() works if using file_exists BUT not overwrite the file or process the move_uploaded_file assuming some tags are correct uploadfile.php <form enctype="multipart/form-data" …

Member Avatar for kanoy83
0
1K
Member Avatar for ehpratah

Hey guys im here again with another question on how to solve this specific problem i have, Whic is also releated on my last thread which is http://www.daniweb.com/web-development/php/threads/461702/cant-combine-two-sql-statement .. so the question now is i have this table Name Payment_type Service_charge test 1 Cash 10 test 2 Cash 20 test …

Member Avatar for ehpratah
0
187
Member Avatar for ehpratah

Good Day everyone(even if its already 10pm here) i know its seems very easy to some of you guys but seems i cant get an hold onto it.. so i have this query that search data between 2 date range(which is working fine) and another query that add all data …

Member Avatar for Rahul47
0
224
Member Avatar for Burhan_1

I am trying to make a script which detects clicks on google ads. All events works like onmouseover, out etc except click, focus, mousedown. When i click on google ads it open its ads link but dont run my jquery script on click event. I have tried preventdefault and other …

Member Avatar for almostbob
0
840

The End.