39,326 Topics

Member Avatar for
Member Avatar for MWEB

Hello everyone :) I have this lines of codes and i get : > Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp22\htdocs\folder\index.php on line 52 ( 19 in the code below ) <form method="POST" action="index.php"> CODE : <input type="text" placeholder="Type the code" name="searchfor" /> <input type="submit" …

Member Avatar for Jan_2
0
936
Member Avatar for New-Reign

After looking around most of last night and all of this morning, I find myself here. I am looking to include a database connection within another class. From what I've read creating a connection within a class is bad? Can someone help me out or even point me in the …

Member Avatar for pritaeas
0
156
Member Avatar for games1124u

Hello, i want to know if somebody could help me to make this script safe. Like how to put mysql_real_escape_string. Or how to use preg_split, or htmletities.... <?php include 'extern/connect.php'; $categories = file_get_contents('extern/categories.php'); $footer = file_get_contents('extern/footer.php'); $logo = file_get_contents('extern/logo.php'); $report = file_get_contents('extern/report.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" …

Member Avatar for pritaeas
0
381
Member Avatar for RGStrat

Hello All, I'm working on a puzzle right now and am a bit stumped. I confess, I'm not much of a PHP programmer, but I don't claim to be either haha. I have an array with several variables: * dad * tsa * aft Next, I have a much larger …

Member Avatar for diafol
0
172
Member Avatar for code_rum

Below is my code.. $stmt->execute($params) is not getting executed $name = $_REQUEST['name2']; $surname = $_REQUEST['surname2']; $add = $_REQUEST['add2']; $pdo = new PDO( "mysql:host = localhost;dbname = employee", "xxx", ""); $stmt = $pdo->prepare( 'INSERT INTO test_differ VALUES( :name2 , :surname2 , :add2 )' ); $params = array( ':name2' => $name, ':surname2' …

Member Avatar for code_rum
0
175
Member Avatar for PriteshP23

I would like to get name of Tilt and its value 30. I am not able to get the value of Tilt. Let me know if you have any idea. Thanks in advanced. XML File: <?xml version="1.0" encoding="UTF-8"?> -<Physical> <Catalog> </Catalog> -<Installed> -<Equipment> <Id>26</Id> <Ref>Tew12</Ref> -<Characteristic> <CharacteristicName>Height</CharacteristicName> <CharacteristicValue>160</CharacteristicValue> </Characteristic> -<Characteristic> …

Member Avatar for PriteshP23
0
2K
Member Avatar for hrrh

hi all friend please help me , i have some error from PHP , who can help?

Member Avatar for crescendo
-2
88
Member Avatar for mpc123

Hi im trying to random showing items from data base and when echoed the same ones appear? If anyone could help that would be great. This is the query SELECT * FROM TABLE1, TABLE2 WHERE FIND_IN_SET(TABLE2.FIELD1, TABLE1.FIELD1) and `FIELDNAME` >= RAND() LIMIT 10

Member Avatar for pritaeas
0
147
Member Avatar for Ed

Hello, I have been trying to insert multiple rows from a web form into a MySQL DB. I have a dynamic table on one page that sets up the arrays and posts the form to another page which does the MySQL bit. Here is the the page with the form. …

Member Avatar for diafol
0
461
Member Avatar for patk570

There is two sections i need it to update. When they hover over the members name listed below, I need it to show their details. When the user(one who submitted the content) posts its going to have a hidden value to update the field in the form that i have …

Member Avatar for diafol
0
346
Member Avatar for wxflint

Hello all its been a while, I have a question on the script below. Here is what I would like to do. Take $file after fwrite has processed and add it to $dir. The Script creates the Directory and the file. I just need it to add the File to …

Member Avatar for wxflint
0
159
Member Avatar for muralibobby2015

We are working on magento. but here we have to get product prices from another website using xml feed. actually we are working on jewellery website using magento. we are adding products from backend. but gold prices are ups and down its depends upon market value. so how can i …

Member Avatar for diafol
4
1K
Member Avatar for divyakrishnan

Hi all, I want to block some of the special charcters using preg_match. I used following code.It works fine with including ' and ". After including ' and " it willnot working <?php if($_REQUEST['sub']) { $Data=$_REQUEST['data']; $regexp = '/[#$%^&*+={}<>'\"]+$/'; echo preg_match($regexp, $Data); if (preg_match($regexp, $Data)) { echo "ERROR"; } } …

Member Avatar for diafol
0
176
Member Avatar for layman114

I am trying to connect to the Ms access database using PHP. The database, that I created has '.accdb' as an extension. I tried the following steps. but I get this error "The specified DSN contains an architecture mismatch between the Driver and Application". Any ideas?? 1. Go to your …

Member Avatar for diafol
0
347
Member Avatar for Siberian

Hi, I found two pages that describe how to check and see if a CronJob with script is working, without waiting for the exact time and date for the cronJob to execute. Are these methods valid methods, or is there a better method to use, so I can check right …

Member Avatar for Siberian
0
351
Member Avatar for sonicx2218

I have never used PHP before. I am familiar with HTML and Javascript, but never delved into PHP territory unfortunately. I'm stuck on a host that does not support PHP directly, but says if I host it on another site and embed it in the html it should work. The …

Member Avatar for diafol
0
142
Member Avatar for davidkroj

How we configure to our website in wordpress? Just i purchased new domain for my new website. But i don't know how we can install to wordpress cms on website. So please guide me! Also want to ask i want to using standard theme on website so can we change …

Member Avatar for RH-Calvin
0
140
Member Avatar for joseph.lyons.754

Hey Guys, I am writing this code to send out personalised emails to potential customers. And i have few questions about the code. This code is made from several tutorials and code examples. I have searched for stuff on it and theres plenty of articles about it but not what …

Member Avatar for joseph.lyons.754
0
301
Member Avatar for rosalyncaraig

good eve. please help give me some codes that used in php Language kht na basic lng po need lang thankyou

Member Avatar for almostbob
-1
94
Member Avatar for thearts.beach

I have this line <INPUT name=c value="<?php echo href="http://',$data2['c'],' " ',$data2['c'],' ?>"> &nbsp; and it is giving out this error Parse error: syntax error, unexpected '=', expecting ',' or ';' in /home/a3024539/public_html/bigtestone1.php on line 21 The output I am looking for is the text from the table to become a …

Member Avatar for thearts.beach
0
294
Member Avatar for engr_pir

Hello, I have used wrodpress Pink rio theme and filterable portfolio ,added some additional images when clicked on project detail link theme flex slider is created right !. I need here my original images (like image.jpg) which will be displayed in its actual size , but image with some cropped …

Member Avatar for diafol
0
196
Member Avatar for csshacker

[CODE]<?php header("Content-type: application/x-msdownload"); header("Content-Disposition: attachment; filename=extraction.csv"); header("Pragma: no-cache"); header("Expires: 0"); require_once( "db.php" ); $query = "SELECT * FROM name ORDER BY last"; $result = mysql_query($query) or die(mysql_error()); echo "ID,First,Middle,Last,Email\r\n"; //header while($row = mysql_fetch_array($result)){ echo "\"$row[id]\",\"$row[first]\",\"$row[middle]\",\"$row[last]\",\"$row[email]\"\r\n"; //data } ?>[/CODE]

Member Avatar for diafol
1
609
Member Avatar for raihanbd1000
Member Avatar for diafol
0
143
Member Avatar for garyjohnson

I have a query in php that has an offset in it. I want the offset value to be a variable but I am not sure how to do so. This is my query but it comes up as an error. $query = "SELECT * FROM comments WHERE `commenter_username` IN …

Member Avatar for diafol
0
181
Member Avatar for nit8899

I have a table with 29 columns and each column with a big title. Is there any way to rotate the header of the table. Thanks.

Member Avatar for pritaeas
0
110
Member Avatar for OsaMasw

hey there I have problem in running som function in php I've created simple chat system , I want to delete every message create 1 hour ago or 30 minutes ago I've used mysql_query("DELETE FROM `chat` WHERE `cht_date` < DATE_SUB(NOW(), INTERVAL 1 MINUTE)"); my "cht_date" type in database is "TIME" …

Member Avatar for OsaMasw
0
299
Member Avatar for official.DJ.cabo

**I got this error on line 369** Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/a4670304/public_html/lol.php on line 369 <?php // session_start(); require_once('auth.php'); include("dbconnection.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="icon" href="img/Untitled-1.png" type="image" /> <link rel="shortcut icon" href="img/Untitled-1.png" type="image" …

Member Avatar for pritaeas
0
575
Member Avatar for official.DJ.cabo

**I Get error like this when i start the host.** <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.watermarkinput.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".search").keyup(function() { var searchbox = $(this).val(); var dataString = 'searchword='+ searchbox; if(searchbox=='') { } else { $.ajax({ type: "POST", url: "search.php", data: dataString, cache: false, success: function(html) { $("#display").html(html).show(); } }); …

Member Avatar for dinhunzvi
0
338
Member Avatar for dinhunzvi

i have a php script that generates a text file. the code is as follows. the text file is being is being created. <?php session_start(); /** * @author FreeUser * @copyright 2013 */ set_time_limit(0); // override the maximum execution time in php.ini file require_once 'includes/mysql_connect.php'; require_once 'includes/functions.php'; if ( isset( …

Member Avatar for dinhunzvi
0
272
Member Avatar for McLaren

Hello, there is lot of discussions and articles about xdebug but I cannot make it working. Everything I do by those writings does not work. I am using wamp server php 5.3.8 on windows and sublime text 2. Tries setting sublime project this way: { "folders": [ { "path": "/D/projektai/glab" …

Member Avatar for McLaren
0
326

The End.