39,326 Topics

Member Avatar for
Member Avatar for ZER09

I have a simple php library that i am using, now i wnat to upgrade it. I want to create namespace on it so my class will be inside on the namespaces bu t i got an error when i i tried to use namespace. here a sample <?php defined('protect')||(header("HTTP/1.0 …

Member Avatar for ZER09
0
163
Member Avatar for masocha

l need to generate a dynamic PDO update query. l am not sure of the behaviour where we have the same placeholder name in th update and WHERE clause for example UPDATE users SET name = 'Master User' WHERE name = 'Dev User' As you can see placeholder name will …

Member Avatar for diafol
0
65
Member Avatar for dannybarh

when i insert text into mysql db and view the page in a appear ,its all put together as one big text block.No spacing, no paragraph ,nothing. i use `openwysiwyg_v1.4.7` in the textarea in my form as my text editor. I want to know if there is a way to …

Member Avatar for diafol
0
91
Member Avatar for Riu 2009

heloo everyone, i am new to mysql and php. here i am diplaying my data by joining 3 tables.what this query is doing 1) displaying course name 2) displaying subject name 3) displaying status if any there are three statuses (applied, accepted, rejected) what i want to display is 1) …

Member Avatar for urtrivedi
0
126
Member Avatar for mbhanley

I am trying to figure out why I am getting this error notice, Does anyone have an idea as to why this is happening. Notice: Undefined offset: 5 on line: `if ($tree[$i]['level'] < $tree[$i+1]['level']) {` on line: `} elseif ($tree[$i]['level'] == $tree[$i+1]['level']) {` on line: `$diff = $tree[$i]['level'] - $tree[$i+1]['level'];` …

Member Avatar for mbhanley
0
192
Member Avatar for Venter

i'm Having 3 tables those are like 1.State table 2. District Table 3.college Table state table cat_id state 1 Andhrapradesh 2 Gujarat 3 Punjab 4 mumbai --------------- district Table cat_id d_id district 1 1 vizag 1 2 eastgadavari 1 3 hyderabad 1 4 westgadavari -------------------------------------- college table Cat_id d_id c_id …

Member Avatar for david.leatherman.908
0
410
Member Avatar for Riu 2009

hi everyone..hope every1 is going great..well i'm a beginner in mysql and php and i cant fix the query as i desire..iam joining 3 tables here and displaying thre data.. 1st i have displayed course names from the courses table 2nd i have displayed the subject names from wich the …

Member Avatar for Riu 2009
0
230
Member Avatar for manishp5

I am trying to insert my form's data radio buttons into my mysql database. it works very well but when i skip any one value of my radio button,as this is more than 20, its giving error that Notice: Undefined index: qr1 in C:\wamp\www\exam\contents\omr.php on line 134 Call Stack # …

Member Avatar for manishp5
0
5K
Member Avatar for neoanomally

**Lay of the Land** I have been tasked with rewriting a website, (I'm new to the ways of PHP). This website is a way for users to transfer files, usually between 10 MB - 1 GB using HTTPS; which includes a coupling to a broad single-sign on service. Half the …

Member Avatar for neoanomally
0
196
Member Avatar for diablo4151

I am working on login form where multiple users can sign in using their username and password. Depending on who it is, it will take them to certain file or link depending on how we set it for that user (john.doe goes to test1.php and jane.doe goes to test2.php). When …

Member Avatar for dbalas
0
11K
Member Avatar for LastMitch

Hi, I'm learning OOP and I'm having issue echoing an `attribute` function. This is my example: <?php class sandwich { function sandwich($hero) { echo "I like to eat $hero sandwich.<br>"; } } $a = new sandwich("roast beef"); $b = new sandwich("pastrami"); $c = new sandwich("turkey"); ?> When I echo it …

Member Avatar for LastMitch
0
142
Member Avatar for BkPrahallad

I'm New in php & practicing a MLM Project, So i want know how to Calculate this & echo the Stages. ![MLM01](/attachments/large/4/MLM01.jpg "MLM01")

Member Avatar for urtrivedi
0
344
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
210
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
211
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
174

The End.