39,326 Topics

Member Avatar for
Member Avatar for mattyd

I am using mysql_fetch_assoc to retrieve and display an array; This is what I recieve upon loading the page: *Warning: mysql_fetch_assoc() expects parameter 1 to be resource* I have researched it and do not understand it. **Snippet* while ($row = mysql_fetch_assoc('$result')) { echo $row["emp_name"]; echo $row["emp address"]; } Thank you, …

Member Avatar for mattyd
0
280
Member Avatar for iamthwee

This is going to sound really stupid, but I'm using 'plesk' and I've written the very simplest form of php mail function. However, it doesn't arrive in my email account. I've tried different email accounts and looked in my spam bin. I've waited days to be sure. I've checked everywhere …

Member Avatar for iamthwee
0
661
Member Avatar for 2mhzbrain

<div> <?php include 'connect.php'; if(isset($_GET['id'])){ $page_id = $_GET['id']; $select_query = "SELECT * FROM articles WHERE articles_id='$page_id'"; $run_query = mysql_query($select_query); while($row=mysql_fetch_array($run_query)){ $articles_id = $row['articles_id']; $articles_date = $row['articles_date']; $articles_title = $row['articles_title']; $articles_category = $row['articles_category']; $articles_image = $row['articles_image']; $articles_content = $row['articles_content']; ?> <h3> <a href="articlespage.php?id=<?php echo $articles_id; ?>"> <?php echo $articles_title; ?> </a> …

Member Avatar for 2mhzbrain
0
296
Member Avatar for azegurb

hi there, this is my class that uses preg_replace_callback I know that when this function used in class i do like that **preg_replace_callback('|(\d{2}/\d{2}/)(\d{4})|',array(&$this, 'next_year'), $text); ** but i dont understand & in front of $this statement if i dont write the & reference operator in front of this it also …

Member Avatar for azegurb
0
167
Member Avatar for iamthwee

As title states my php mail function is NOT working with Gmail. However, it does work when sending to other domains such as hotmail and yahoo. I have checked my spam box. Any ideas. I have noticed that when I use phpmailer.php and link it to my gmail account as …

Member Avatar for cereal
0
796
Member Avatar for BenWard

I had to map a network drive with specific credentials in my PHP script and it kept falling over because I'd already navigated to the drive in windows explorer. This snippet will unmap a network drive using COM regardless of whether or not there is a drive letter associated with …

0
617
Member Avatar for nawazsj

please help me to display the multiple image from mysql this id my file for uploading multiple image $valid_formats = array("jpg", "jpeg", "png", "gif", "zip", "bmp", "pdf", "doc", "docx"); $max_file_size = 100000*100; //100 kb $path = "uploads/"; // Upload directory $count = 0; extract($_REQUEST); // Loop $_FILES to execute all …

Member Avatar for pritaeas
0
314
Member Avatar for dippy78

Hi Team, Please hekp me with the OCILogon error. Im using WampServer Version 2.2. I have a script which connects to 10g and 11g database and it works perfect from the browser. Now i want to automate the php script via batch file which will be windows 7 schedule task. …

Member Avatar for dippy78
0
982
Member Avatar for xmas4evermine
Member Avatar for phorce
0
85
Member Avatar for RikTelner

Main content <?php echo $test; include "index.php?test=solved"; echo $test; // expected: "solved" if (isset($_get["test"])){ $test = $_get["test"]; } ?> File ends here error starts here. Notice: Undefined variable: test in C:\-------\XAMPP\htdocs\index.php on line 4 Warning: include(index.php?test=solved): failed to open stream: No error in C:\-------\XAMPP\htdocs\index.php on line 5 Warning: include(): Failed …

Member Avatar for RikTelner
0
165
Member Avatar for nacedo

I am starting a new project and I dont have experience in PHP in general. To help me up and speed things up some of my coworkers told me about CakePHP and Yii. I want to make a hotel reservation system (frontend and backend) and I was wondering wich to …

Member Avatar for baig772
0
140
Member Avatar for LRNPHP

Hi All, I'm battling to get this query to work. I have a select form that allows user to select dates. When he submits it it needs to remove weekends from the request. $DateStart='2013-09-01'; $DateStart='2013-09-05'; $DateSTR=strtotime($DateStart); $DateSTO=strtotime($DateStop); for($i=$DateSTR; $i<=$DateSTO; $i++){ $NewDate=strtotime($i); $DateCalc=date('D', $NewDate); $TotalCount++; if($DateCalc == 'Sat' || $DateCalc == …

Member Avatar for LRNPHP
0
441
Member Avatar for everton.retweets

Hi Everyone, I am using the following slugify script and would like to concatenate two php variables. The two variables I would like to concatenate are $firstname & $surname. The end result should be firstname-surname. function slugify($text) { // replace non letter or digits by - $text = preg_replace('~[^\\pL\d]+~u', '-', …

Member Avatar for everton.retweets
0
419
Member Avatar for mattyd

*Yes, the reoccurring issue* I have yet to solve: Posting the contents (Saved to a DB) of a form to a redirected page. Everything works except the rendering of the form data on the redirected page. I've been trying everything that I can think of. I've been researching this for …

Member Avatar for mattyd
0
140
Member Avatar for johnef_sh

I am trying to upload multi-images I am using this script everything is fine and the images uploaded successfully the problem here is I don't want to duplicate the images name so I used this script to avoid this but no luck any idea this is my code <?php if(isset($_POST['submit'])){ …

Member Avatar for anas.man
0
272
Member Avatar for mattyd

I call it "Compartmentalization", that is, taking a long .php file and breaking it down into smaller components; Seperate .php files. This will keep everything tidier, cleaner, more organized, reusable and I believe, more secure. **Example** (Not my code - Maybe not a *perfect* example of this idea, but for …

Member Avatar for pritaeas
0
171
Member Avatar for FOYSAL_1

I want to use calander to pick a date as DD.MM.YYYY and post to database. Please help............ Entry.php <?php require 'config.php'; if (isset($_GET['logout'])) { unset($_SESSION['isLogged']); unset($_SESSION['isLogged']); session_destroy(); header('location: index.php'); exit; } if (!isset($_SESSION['userLogin']) && !isset($_SESSION['isLogged'])) { header('location: index.php'); exit; } ?> <!doctype html> <html> <head> <meta itemprop="image" content="mainlogo_title.png"> <title>SEA TURTLE …

Member Avatar for pritaeas
0
430
Member Avatar for harjinder007

I need to redirect specific URLs to their new equivalent. i have a single dynamic page(pages.php) and i fetch data from database.(like domain_name.com/pages.php?id=4) and i want to redirect to domain_name.com/pages/name or domain_name.com/name on same page with different names(for example if pages.php id=4(example- domain_name.com/pages.php?id=4) and id 4 have name welcome then …

Member Avatar for harjinder007
0
209
Member Avatar for Shahbaz_2

I am new in web and PHP want to learn about session... how they are made on login... and how they are carried to next page... i know to make database and queries..

Member Avatar for Shahbaz_2
0
235
Member Avatar for vagheladevr
Member Avatar for spaghetti_code

Hey guys! I'm working on an open-source video game and things are going well enough, except for the part where I'm trying to work around my n00bish socket-programming background to build the server component. I had the server software working from a single-user perspective, but when I tried to add …

0
69
Member Avatar for bops

I've been having tonnes of issues with Mod Security. I am busy writing a CMS for a project at work and while developing a page to edit a certain database record I kept getting 403 errors. After hours of banging my head against my desk, adjusting bits of code I …

Member Avatar for bops
1
1,000
Member Avatar for geneh23

Hey everyone, Hope everyone is doing well! So I might seem a little dumb to post this but I've googled and searched every possible thing I can think of to get my contact form to work and send an email. The validation, which in this case is defaulted to jquery …

Member Avatar for AmirHosseinHP
0
2K
Member Avatar for neha05

plugin for admin panel in which user can login on its ftp details and download all files(.csv I have Ingram Micro products details) and show only check information on sites.so any plugin is available for that ??

Member Avatar for neha05
0
165
Member Avatar for baig772

Hi Any one ever wrked on live helper chat? [This](http://livehelperchat.com/) This is following template structure may be symfony or smarty and I am looking to change some form labels, but cannot figure out where to chage? Thanks in advance for help

Member Avatar for baig772
0
218
Member Avatar for M.Waqas Aslam

Dear all! I am creating a proxy website, which will open a restricted site. Proxy is working very fine and I am happy with it.Now there is a site which only allow in my clients country. Site need username and password to allow user to view contents, Now I want …

Member Avatar for minitauros
0
120
Member Avatar for Indians

Here, i'm trying to fetch the image from database. In my database i can see a image file size ([BLOB - 62.3 KiB]). But, it didn't work. i didn't get any error here. i'm confused where i made a mistake here? <?php include('config.php'); ini_set('display_errors', '1'); error_reporting(E_ALL); try { $stmt = …

Member Avatar for AmirHosseinHP
0
2K
Member Avatar for Indians

Recently i've rewritten my code to PDO from mysql query. Insert, fetch, update, delete everything working fine. But, pagination not displaying in my page. Before i've used mysql query. In that time pagination worked perfectly. Now, i've changed my codes into prepared statements. pagination not dispalying i don't know what …

Member Avatar for bops
0
306
Member Avatar for aals

hey...i need help with magento...with a travel booking engine integration i have got the directory structure figured in magento. There is this static block where i need the booking form to be put up, then i need to create page where the results are to displayed... i jus dont how …

Member Avatar for Mobcom
0
312
Member Avatar for rhodoscoder

//index.php $img_dir ="C:/xampp/folders/img/*.jpg"; $thumb_width = 100; // Open a known directory, and proceed to read its contents $scan= glob($img_dir); foreach($scan as $image) { $im= imagecreatefromjpeg($image); $img_width = imagesx($im); $img_height=imagesy($im); $thumb_height= floor ($img_height *($thumb_width/$img_width)); $new_img=imagecreatetruecolor($thumb_width,$thumb_height); imagecopyresized($new_img, $im, 0,0, 0, 0, $thumb_width, $thumb_height, $img_width, $img_height); $thumb_path = "C:/xampp/folders/thumbs/"; imagejpeg($new_img,$thumb_path); } The error …

Member Avatar for minitauros
0
237

The End.