39,316 Topics

Member Avatar for
Member Avatar for vivosmith

Hello, I have started learning php and mysql recently, and I have run into problems. I received this code: * Parse error: syntax error, unexpected 'average_user' (T_STRING)* and the problem is that I granted SELECT to average_user in the databse, but it is coming up with an error. What is …

Member Avatar for vivosmith
0
379
Member Avatar for daniel36

i am having the code if (eregi($file,$_SERVER["HTTP_ACCEPT_LANGUAGE"]) && !$use_lang) $use_lang = $file; This line of code is giving error:-Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\spm\includes\header.php on line 15

Member Avatar for pritaeas
0
155
Member Avatar for rotten69

Hi there, I have been trying to fix the problem in the below code for a long time, it did work for me at some point. Then, it suddenly stopped storing user's details in a session. $user = $_POST['username']; $pass = $_POST['password']; $query = "SELECT username, password FROM USERS WHERE …

Member Avatar for diafol
0
209
Member Avatar for aritabacan

----------------- sql ------------------------- CREATE TABLE IF NOT EXISTS `friend` ( `uid` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(30) DEFAULT NULL, `friends` text, PRIMARY KEY (`uid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ; -- -- Dumping data for table `friend` -- INSERT INTO `friend` (`uid`, `username`, `friends`) VALUES (1, 'admin1', 'a:2:{i:0;s:1:"4";i:1;s:1:"5";}'), (2, 'admin2', …

Member Avatar for aritabacan
0
169
Member Avatar for Khav

Hi All I have an file upload form and i secured it pretty well...One tedious problem is double extention upload. suppose user have a file `image.png` This upload fine and is fully legit.Now suppose a malicious user upload a file like `image.php.png` This file can simiply be a php shell …

Member Avatar for Khav
0
4K
Member Avatar for shhh
Member Avatar for bLuEmEzzy

Good day, Please help guys, I have records in which if I updated table1, I have to update table2. This is my code for update table1(which is proja) $sqlu = mysql_query("UPDATE proja SET pname= '$par', amunt = '$amt', janua = '$jan', febru = '$feb', march = '$mar', april = '$apr', …

Member Avatar for bLuEmEzzy
0
210
Member Avatar for patsfans

I have two tables that I need to get the following information but I can't seem to figure out how to structure the query: Table 1 type show max min Table 2 model height width depth In Table 1 I have the following for the first row (as an example): …

Member Avatar for Icone
0
181
Member Avatar for atkinsonsits

Hi I am attempting to build my own cms (although very basic) using php and mysql. Instead of having a static homepage, I want the content displayed to be dynamic. In other words, I want the homepage to be flexible/changeable based on whatever the latest 'content' entry into the database …

Member Avatar for Icone
0
1K
Member Avatar for Gearspro

Hello, this maybe a obvious. But i'm new to all this and i really need some help! :). I was wondering if someone knew how i could turn off email verification (being emailed to confirm the account) As i feel it is not necessary to have spam stopper, being an …

Member Avatar for I.M.O.G.
0
303
Member Avatar for Goldfinch

I ordinarily submit data to my PHP script through a POST action that redirects the page, but I'd like to get Javascript to handle that so I stay on the same page.

Member Avatar for GliderPilot
0
129
Member Avatar for rollerhockey97

Hello everyone, I'm attempting to make a email contact form for my website but I keep getting an error that reads "Warning: Invalid argument supplied for foreach() in /nfs/[......]/contact_fa.php on line 15." That points to this line right here: foreach($_POST['check[]'] as $value) { $check_boxes .= $value." "; } This is …

Member Avatar for rollerhockey97
0
317
Member Avatar for Goldfinch

Hi, I've been having trouble with a form script that sends an e-mail but doesn't format the information correctly: $formcontent="VISITOR NAME: $name\\n\\nFEEDBACK: $message"; $recipient = "facadmin@frontandcover.com"; $subject = "Contact Form"; $mailheader = "From: $email\\r\\n"; $mailheader .= "Reply-To: $email\\r\\n"; $mailheader .= "MIME-Version: 1.0\\r\\n"; if(strlen($message)>0){ mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!"); echo …

Member Avatar for Goldfinch
0
200
Member Avatar for flynismo

Hi all, I'm currently putting together a search engine for my website, and so far, everything is going pretty smoothly. The only thing left that I would like to do is when the search results are displayed, I want to be able to highlight the search term entered in the …

Member Avatar for flynismo
0
625
Member Avatar for jacob21

Hi, i am inserting data from CSV file in mysql. I am trying to skip ist row of CSV file as it contains headings. need suggestions??

Member Avatar for pritaeas
0
202
Member Avatar for jady789

I am facing some problem in my code I want to calculate the total pay of the employers but unfortunately I am unable to figure it out. I want to add the total such like if the person works normal hours means (9 hours) and overtime as Monday to friday …

Member Avatar for jady789
0
189
Member Avatar for PriteshP23

How to sort by column header dynamically in the table ? Table should be sorted by all column. <?php $order = (isset($_POST['sortCostCode']) && strcasecmp($_POST['sortCostCode'], 'desc') == 0) ? 'DESC' : 'ASC'; $query = 'SELECT * FROM `Humeur_log` ORDER BY `Humeur_log`.`logid` DESC LIMIT 0 , 30' . $order; $result = mysql_query($query); …

Member Avatar for PriteshP23
0
2K
Member Avatar for James singizi

i want to query my database using php count to count the number of values in a table then count which value appears more times than the others. Im new to this kind of thing.

Member Avatar for pritaeas
0
172
Member Avatar for AndreRet

Stuck again... :) I am returning close to 60 records from a search in mysql. I want to add these records to a select box. When I am looping through the records, it adds a select box for each record. Not sure where I am going wrong. It does load …

Member Avatar for AndreRet
0
274
Member Avatar for rotten69

Hey guys, I don't see anything wrong in the function but mysql_result is complaining about the parameter value passed to it. function question_exists($question_id){ $question_id = (int)$question_id; return ( mysql_result(mysql_query("SELECT COUNT('id') from `posts` WHERE `id`=$question_id"),0) == 0) ? false : true; // if the question doesn't exist (equal to ZERO) then …

Member Avatar for rotten69
0
128
Member Avatar for moha_1990

<?php session_start(); if(isset($_SESSION['idAdmin'])){ include("config.php"); $id = $_SESSION['id']; $query = mysql_query("SELECT * FROM register WHERE id = '$id'") or die (mysql_error ()); ?> <!DOCTYPE html> <link rel="stylesheet" type="text/css" href="styles.css" /> <html lang="en"> <head> <title></title> <meta charset="utf-8"> <link rel="stylesheet" href="css/reset.css" type="text/css" media="all"> <link rel="stylesheet" href="css/layout.css" type="text/css" media="all"> <link rel="stylesheet" href="css/style.css" type="text/css" media="all"> …

Member Avatar for leviathan185
0
222
Member Avatar for <M/>

Hi, I wrote a php form and when I look at the confirmation email.... 2 things happen. 1. My logo dipslays as a link... I want it to be an image... 2. All the html tags display with the content that is meant to show... I don't want to see …

Member Avatar for Zagga
0
305
Member Avatar for bilal.saim

<?php $tipi = array("asd","222","dda","xcs"); $gun = array("qwe","vvv","zzz","bffg"); $ay = array("asd","bbb","23a","wqe"); $yil=array("zzz","sad","cxc","zxca"); $say=0 ?> <script> var tipi = new Array(); var gun = new Array(); var ay = new Array(); var yil = new Array(); for(var j=0;j<4;j++) { tipi[j] = " <?php echo "$tipi[$say]" ?> "; gun[j] = " <?php echo …

Member Avatar for bilal.saim
0
233
Member Avatar for mbhanley

I am trying to configure a menu for my CMS I want to be able to use Nested Sortables just like you have in WordPress. The problem Im having is getting my head around how I am going to start I already have a column in my database table called …

Member Avatar for mbhanley
0
714
Member Avatar for Rizi004

Hi I want to find friends on facebook from other websites. How i can find the facebook friends, i have read https://developers.facebook.com/docs/reference/api/ this but can't find the solution plz help me, tell me how i can find the facebook friends. Waiting for your reply Thanks

Member Avatar for LastMitch
0
52
Member Avatar for LastMitch

Hi I'm bit stuck on how to put a period in array. This is my example: <pre> <?php $str = 'I like to eat Strawberry Cheesecake.'; $words = preg_split('@([\W]+)@', $str); var_dump($words); ?> </pre> This is how it's `var_dump()`: array(7) { [0]=> string(1) "I" [1]=> string(4) "like" [2]=> string(2) "to" [3]=> …

Member Avatar for LastMitch
0
255
Member Avatar for FakeTales

I am able to set up a connection via client to server , however i am trying to write to a textfile the variables from a form this form is then sent to the server it is opened up then i exploded the data within the text file , place …

Member Avatar for FakeTales
0
324
Member Avatar for bilal.saim

<?php $say=0 ?> <script> for(var j=0;j<limit;j++) { tipi[j] = " <?php echo "$tipi[$say]" ?> "; gun[j] = " <?php echo "$gun[$say]" ?> "; ay[j] = " <?php echo "$ay[$say]" ?> "; yil[j] = " <?php echo "$yil[$say]" ?> "; <?php $say++; ?> } <script/> //I want to increase $say in …

Member Avatar for diafol
0
172
Member Avatar for <M/>

I am trying to add a feature into my webform that allows users to recieve text messages that confirm their web form submission... and I am kind of lost in doing so... Can someone guide me... I wasn't sucessful with google for the heads up....

Member Avatar for diafol
0
127
Member Avatar for AndreRet

I am totally stuck here and found tens of samples on posting to get and set values. What I am trying to do is - 1) Let a user enter a vehicles year model into a textbox in my form (set to post) 2) I then need to get this …

Member Avatar for AndreRet
0
224

The End.