39,323 Topics

Member Avatar for
Member Avatar for appooti
Member Avatar for er.Mohit

<?php $con = mysql_connect("localhost","ourinter_admin",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("ourinter_database", $con); $sql="INSERT INTO donation( firstname, lastname, gender, country, fulladdress, phone, emailaddress, donate, total, creditcard) VALUES ('$_POST[firstname]', '$_POST[lastname]', '$_POST[gender]', '$_POST[country]', '$_POST[fulladdress]', '$_POST[phone]', '$_POST[emailaddress]', '$_POST[donate]', '$_POST[total]', '$_POST[creditcard]' )"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo …

Member Avatar for Squidge
0
36
Member Avatar for weirdCreature7

A newbie here I am having an error with this code. If I logged in with correct username and password the "Sorry please log in" is appearing not the home page :( I am having a hard time to check if the user has log in or not when opening …

Member Avatar for diafol
0
170
Member Avatar for Veronika9

Hi guys, I read about this problem but can't figure what should I change. Can you please help? Here's my code: <?php // Title: Contact Form - Dolce Forno GB // Updated: 9/8/2012 // Author: Veronika Horvathova //Validation code if (empty($_POST) === false) { $errors = array(); //variables $name = …

Member Avatar for addme
0
217
Member Avatar for shhh

i want to have a space between a div <div class="img"><a href="#"><img src="2.jpg"></a></div> <div class="img"><a href="#"><img src="3.jpg"/></a></div>

Member Avatar for Squidge
0
68
Member Avatar for mtho

Hi guys. I want to insert an advert after the first article on my blog. It's not a wordpress or other generic blog. I have an idea on how i should do it but it just doesn't work when i try. I use a do-while loop to call the articles. …

Member Avatar for mtho
0
97
Member Avatar for gorybmovie

I keep getting this error message when I try to 'login' to my php member system that I'm creating. Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\acrd\includes\header.php:24) in C:\xampp\htdocs\acrd\login.php on line 21 Here is line 21 header('Location: index.php'); Here is my code. Please help! …

Member Avatar for gorybmovie
0
193
Member Avatar for JarrodIsSuperman

Hey guys, Having an issue with a webpage I am building. I can get it to save the name of the image, however when I echo it out and im trying to include it as an img src tag it tells me I have a syntax error. I think this …

Member Avatar for JarrodIsSuperman
0
522
Member Avatar for jadzrev13

Hi Everyone, I am a beginner in PHP and would need your help with this. I get this problem: Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in database.php on line 207 Here is my code: include("constants.php"); class MySQLDB { var $connection; //The MySQL database connection var …

Member Avatar for ryantroop
0
339
Member Avatar for han2503

I've been getting this error after I insert the require_once('login.php') I've checked both files and I don't have any empty lines after the php closing tags as is usually the case with this error This is the code [CODE]<html> <head> <title>Home</title> </head> <body> <link rel="stylesheet" type="text/css" href="style.css"/> <?php require_once('login.php'); require_once('appvars.php'); …

Member Avatar for huded
0
362
Member Avatar for adishardis

I'm trying to get a flot graph to show my jsonencoded array seen below: [["aa",71],["ab",69],["ac",66],["ad",61],["ae",79],["af",78]] In the array the first is what i want on the xaxis and the second is the corresponding value. Right now my flot graph outputs an empty chart and I'm thinking that the array need …

Member Avatar for adishardis
0
1K
Member Avatar for DaveyMoyes

Hi all - I have the following variable in my code $url=urlencode(''.$token.''); How can I add &app_data=any_string_here to the above variable, everytime I add it, I get an error saying unexpected

Member Avatar for Squidge
0
74
Member Avatar for logicaweb

I'm trying to make multiplication in web shop that will show real price: **discount * tax * product price * 1 piece= real price** But I just don't know how to do it, I try 1 million things, spend about 48h just to make it, but, without success, no matter …

Member Avatar for logicaweb
0
324
Member Avatar for devianleong

function returnnotify(){ $result = mysql_query("SELECT * FROM rentcustomer WHERE Expiredtime = CURDATE()"); $count = mysql_num_rows($result); if ($count >= 1){ echo $count; }else{ echo "0"; } } now when I run the code above ,it will prompt out this error: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in …

Member Avatar for pritaeas
0
251
Member Avatar for angelic_devil

i want to create a folder on server using php and make it writable so tht i can upload files to it using form... can someone help me with script on making folder and making it writeable on server. thanx

Member Avatar for vikramrawale
0
1K
Member Avatar for kbat115

I've been having a bit of problems with a file. Here is the script that I'm having issues with and the exact error is as follows: Parse error: syntax error, unexpected $end in /hermes/bosweb/web168/b1683/ipg.xoizocom/pba/login/index.php on line 239 <?PHP require_once("globals.php"); $INFO = array(); $ipsclass = new ipsclass(); $ipsclass->vars = $INFO; $script …

Member Avatar for andyy121
0
528
Member Avatar for arunpawar

I am trying to get into php object oriented programming. <?php class myClass{ public $myVar="this is demo"; public function myTextdemo(){ echo $myVar; } } $obj= new myClass; echo $obj->$myVar; ?> It says > Fatal error: Cannot access empty property on line 11 What's wrong with my code?

Member Avatar for arunpawar
0
174
Member Avatar for Riu 2009

<?php $title=$_POST["title"]; $theme=$_POST["theme"]; $con=mysql_connect($dbserver,$dbusername,$dbpassword); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $query=mysql_query("SELECT * FROM setup WHERE id=".$_SESSION['id']); $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { while($row = mysql_fetch_array($result)) { $_SESSION['id'] = $row['id']; $_SESSION['title']=$title['title']; $_SESSION['theme']=$theme['theme']; } { mysql_query("UPDATE setup SET title='".$title."' , theme='".$theme."'WHERE …

Member Avatar for Riu 2009
0
1K
Member Avatar for thecameraman

Hello, I want to display the fields that were updated. When a user edits their information, example; "FIRST NAME:John LAST NAME: Stih Update to:UPDATE users SET firstname = '$firstname', lastname = '$lastname' FIRST NAME: John LAST NAME: Smith I would want it to print "You updated your Last name"

Member Avatar for pritaeas
0
167
Member Avatar for DrPepper8412

Tons of errors. Keep getting parse errors....line 45, 59...every time I get one, more pop up...please help. <?php session_start(); //ini_set( "memory_limit", "128M" ); //error_reporting(5); // added in by jaime to insure they are logged into the admin if(!$_SESSION["loginOK"]){ $err=1; $message="You must log in first"; exit; } if($_REQUEST["button"]=="Return to Main Menu"){ …

Member Avatar for Morta
0
354
Member Avatar for AmrReflection

I am trying to make a forum and still thinking what language to use ASP.net or PHP. Can any one tell me the Pros and Cons of each language ?

Member Avatar for blocblue
0
83
Member Avatar for ska_defender

Hello, The following script writes to a file include.php <?php $path = "./files/"; $path2="http://".$_SERVER['SERVER_NAME'].dirname($_SERVER["PHP_SELF"])."/files/"; //echo $path2; $folder = opendir($path); $start=""; $Fnm = "./include.php"; $inF = fopen($Fnm,"w"); fwrite($inF,$start."\n"); while( $file = readdir($folder) ) { if (($file != '.')&&($file != '..')&&($file != 'index.htm')) { $result="{\nlevels: [\n{ file: \"$path2$file\" }\n],\n\ntitle: \"$file\"\n},\n"; fwrite($inF,$result); } …

Member Avatar for Morta
0
213
Member Avatar for monica.slocum

Ok, I am very new at php coding but I thought I would give it a shot. I am building a site for a friend of mine for his video game team. The problem I am having is they want an application form so I made the form but I …

Member Avatar for ryantroop
0
141
Member Avatar for iamthwee

OK I've got another interview! Thanks to pritaes for the links etc. Never thought I might be doing a programming job but hey, it's a laugh I guess. I have a few questions I may want to ask about OOP in version 5, but also codeigniter and joomola... So learning …

Member Avatar for pritaeas
0
138
Member Avatar for thecameraman

Hello, I created a site where you have to log in and it begins a session. I wanted to make a stay logged in feature so I started using cookies. I made it so if there was no session then check for cookies. My site also sends out emails with …

Member Avatar for thecameraman
0
204
Member Avatar for Squidge

Hi all, I am working on a generic form validation class. However I have hit a stubling block. Form fields will never be the same from user to user. Is there a work around for this? Would it be easier to use numerical values for field names and use multiple …

Member Avatar for Squidge
0
203
Member Avatar for scaiferw

I have a configuration table with one row per configuration item (id,category,name,value,description,comment). My objective is to create a single edit page that shows all, or a subset, of these values and allows me to edit them. I could probably create a page with a separate form and submit button for …

Member Avatar for scaiferw
0
112
Member Avatar for nil_gh_80

Dear members, I'm in serious problem. I need a tool which can get all content information of a website and at the end these information will produce a CSV. That CSV will be imported in another database...can anyone help me regarding this issue..

Member Avatar for Rockabilly75
0
153
Member Avatar for xbat

I on my drop down boxes it keeps on selecting more than one option I just want it to select out of one row... for some reason this won't work nothing shows - $query["cost1"] = "SELECT ourprice as text, ourprice as value FROM `fruitinventory` WHERE seeddescription='%s' AND fruitdescription='%s'"; Something shows …

Member Avatar for xbat
0
196
Member Avatar for phpHelp

Hey guyz...help me! I have a live site which is working perfect. I have migrated the whole site to localhost and the DB too but some links (url) are not working...Error 404..i don't know from where links(url) for articles can be edited.

Member Avatar for phpHelp
0
230

The End.