39,402 Topics

Member Avatar for
Member Avatar for Waardii

hi, I am currently making a website and was wondering how to make it so that when a button is clicked it will update a field in the database by +1. This is sort of a 'like' system for photos so someone can view a photo and then press this …

Member Avatar for karthik_ppts
0
3K
Member Avatar for gopi17

Okay this is my code, i can't get the else statement part to work...can anyone kindly assist me...i find nothing wrong with the syntax...thank u... ps: no error... [CODE]<?php session_start(); $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="test"; // Database name $tbl_name="testing"; // Table name …

Member Avatar for scarcella
0
95
Member Avatar for timwhelan

I need helping thinking though something. I am pulling dates, Year, Month of that year and an amount. I then want to go to the next year. So, 2010 then 12 rows of the months with amounts, then 2011 then 12 rows of the months printed out with amounts... Ex: …

Member Avatar for timwhelan
0
251
Member Avatar for vlowe

Hi can you advise if this is possible and how please? I have a cmd line program which i want to run "PPP.exe test" i then get a response saying i am in the program, then i need to send further perameters. "set username Bill" - i will get a …

Member Avatar for diafol
0
143
Member Avatar for arihantphp

Below is the code which is supposed to redirect to a page once the whole form is filled up, the code works like a charm on my XAMPP server (localhost) , but as i uploaded my pages to my hosting area, the page stops redirecting, all it does is come …

Member Avatar for vaishalrs2007
0
231
Member Avatar for danielbala

Hi.. I am trying to write a k nearest neighbor and BART bayesian additive regression tree algorithm for identifying Spam emails in php Can any1 guide me on how to implement these algorithm ? This is for my thesis..im just learning php.. If some one could give me sample code …

Member Avatar for danielbala
0
101
Member Avatar for zack654

Hi, I coded some web applications (blog, message board) all in procedural way, and now I want to start doing all that with planing and clean and extensible code. I now that OOP is the way, I checked MVC system of programming, and everything seems nice. I already know syntacs …

Member Avatar for veedeoo
0
243
Member Avatar for deyesborn

I want to retrieve email from database and send message to all the email address. I have written code for that but it is not working. I want someone to help me look at the code below and point out where am making mistakes and the correction. The first page …

Member Avatar for karthik_ppts
0
3K
Member Avatar for davy_yg

Hello, How to program browser detection in php ? I would like to detect the browser automatically, then use if browser = ... then ... else if browser = ... then .... endif How to do so ? Thanks.

Member Avatar for emclondon
0
384
Member Avatar for qwest21

HI, i have designed a website for online discussions using wordpress 3 as the front end and PHPBB3 for the forum part, my trouble is its not sending email alerts when a new comment is posted in the forum although every member is subscribed to forum, and even when here …

Member Avatar for pritaeas
0
94
Member Avatar for ShadyTyrant

I came across a problem that I hope you guys can help me with. On register I generate a random salt, hash the password with it and a system salt, and place it in the database. On login I generate a hash from the input password the salt that is …

Member Avatar for ShadyTyrant
0
121
Member Avatar for ravi52542

hi anyone please send the php code for display the live currency conversion rate for all over currencies in the world thank you

Member Avatar for pritaeas
0
76
Member Avatar for gopi17

Guys, need some help regarding this issue, i have a php file, which requests an invoice_no(invoice.php), then searches the database and returns the other value associated to it(eg,document_no,PO_no) to another php file(displaydata.php). Now the problem is, i wanna send the invoice_no not only to displaydata.php but to another file test.php. …

Member Avatar for gopi17
0
141
Member Avatar for help4kids

Parse error: syntax error, unexpected T_STRING in /home/help4kid/public_html/language/lang_english/lang_main.php on line 148

Member Avatar for karthik_ppts
0
245
Member Avatar for daitken

This is my first post here as I am a student that is just learning (getting dangerous with) HTML but I have a problem that I understand could be helped with php coding. The reason I want to use this is to cut down on the amount of coding on …

Member Avatar for Zagga
0
882
Member Avatar for Que336

Hi I'm having problems unsetting session varibles using this code. I'm not sure what I'm doing wrong. Nothing happens. Please help [CODE]<?php session_start(); $id = $_GET['id']; $pro = $_SESSION['products']; $qua = $_SESSION['quantity']; echo $pro[$id].''." Has been removed"; unset($pro[$id]); session_write_close(); unset($qua[$id]); session_write_close(); ?>[/CODE]

Member Avatar for Zagga
0
117
Member Avatar for diafol

Hi All. I'm getting to grips with OOP (slowly) and I was wondering how you go about applying general functions to classes. For example, if I have a few general functions - this is a silly example, but should give you an idea of what I'm asking: [CODE]function strBig($str){ return …

Member Avatar for diafol
0
116
Member Avatar for patrick1981

I want to manually test my sites to check if they are secure against SQL injections. Whats a good way to attempt it. How do I get started? thank you

Member Avatar for patrick1981
0
190
Member Avatar for Virangya

hi, i'm developing this small seo component, i want to know how it should be done. now i'm writing seo meta tags and other tags search engines looking into the page. i'm getting the content of the page and look for the previous set of say, keywords and replacing them …

Member Avatar for Virangya
0
139
Member Avatar for Que336

Hi I have been going through a tutorial i came across online. Please let me know what this would read if it wasn't written in shorthand. Regards [CODE] $products = isset($_SESSION['products']) ? $_SESSION['products'] : array();[/CODE]

Member Avatar for cereal
0
127
Member Avatar for Danny159

Hey, We have a good few websites that use Google's reCAPTCHA and in the past 24 hours spammers have been bypassing the reCAPTCHA... has anyone else been having this problem?? Or know of a fix. Spammers haven't been able to use the form until last night when somehow they got …

Member Avatar for Danny159
0
81
Member Avatar for anthonyjpv

Hi! Could someone show me how to implement swap algorithm in php and mysql? ie: I have 4 records in a table each are sorted by column position say position 1 2 3 4 if I move an existing position from 4 to 1 number 1 will be moved to …

Member Avatar for newbie1234
0
127
Member Avatar for mickburkejnr

Hi everyone, I'm building a project with CakePHP and I would like to be able to have pages that are created dynamically. So, if a user goes to [url]www.domain.com/page-name[/url], the controller should take the /page-name part of the URL, search the database for it, and then display the results in …

Member Avatar for mickburkejnr
0
378
Member Avatar for kalaban

good day guys; I hope somebody could help me again with my problem I'm working with this for a month now and It seems I cant analyze what's wrong with my code. now here's what I want to happen I want to count and pull the records from a table …

Member Avatar for kalaban
0
330
Member Avatar for Bubbleboy

I have a set of PDF files on our website that the user needs to log in in order to view. The only problem is once they log in and get the URL for them, they can email it to their friends or anyone and they can be viewed by …

Member Avatar for lps
0
107
Member Avatar for danielbala

Hi... How to analyse the spoofed emails... 1. identify the list of contacts 2.analyse their mail over a period of time and the no.of emails sent by them. 3.if they r a legitimate sender say like u but i start continously recieving spam mails frm your account (60/100) then i …

Member Avatar for rch1231
0
98
Member Avatar for kimmi_baby

Hi, I want to create an accordion catalogue component for Joomla. To get started and to learn about creating components, I went through this tutorial [URL="http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1"]http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_1[/URL] The Joomla Hello World tutorial. Now I found when I finished it, it would only display one line from the database and not all …

Member Avatar for mahm240
0
119
Member Avatar for eltonpiko

Hi im currently trying to develop a Joomla component and trying to create the back admin form for my component. I have a table containing category name and another linked to it using category id and in my joomla form need to get the category name in a drop down …

Member Avatar for mahm240
0
114
Member Avatar for DaveyMoyes

Hi all, I am looking to understand Html entities & html special chars in more details. I have a form and text area that users complete, the databse updates correctly and displays the information. The problem im facing is this: When the database displays the data, its display incorrectly. For …

Member Avatar for karthik_ppts
0
224
Member Avatar for klemme

Hi, [B]FIRST: Would it be better to use sessions to store shopping cart information, or would it be better to store them into the database when a product is added to the cart? Or is one not better than the other?[/B] Can someone point me in the right direction, on …

Member Avatar for scarcella
0
182
Member Avatar for gilanib

Greetings! I have a website [url]www.lanceronlinejobs.com/our_franchises.php[/url] I have a franchise images. I want to display each franchise record from database whenever a user click on franchise link. Here is my code. ourfranchises.php code: [CODE]<?php include('fconnection.php'); $sql = mysql_query("SELECT * FROM tbl_franchise ORDER BY id DESC") or die(mysql_error()); $row3 = mysql_fetch_array($sql); …

Member Avatar for scarcella
0
197
Member Avatar for opjjuly

Ok i dont know if im posting this on the right thread, but i assumed PHP can do this. I need to optimize my website for mobile phones. The saddest thing is my web host does not support .htaccess, when i contacted them, they asked me convert the rules to …

Member Avatar for versan
0
319
Member Avatar for angelclawdust

hello there im trying to add 2 links to a login menu after the user had logged in it should display there name followed by you are logged in. but if there user level is -1 then it should also add below that the 2 links create fixture and reset …

Member Avatar for angelclawdust
0
159
Member Avatar for nyancat

Hello, I want to add another receiver to this contact form, he has to be bcc, and not shown as receiver but still receiving the message from the contact form: [code] <?php if(isset($_POST['submit'])) { error_reporting(E_NOTICE); function valid_email($str) { return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE; } if($_POST['name']!='' && …

Member Avatar for pritaeas
0
150
Member Avatar for subrata_ushasi

Hi all, I am creating an cms/admin where I want a drop down consists of list of product and an another drop down consists of list of sub products. On selection a product ,the corresponding lists of sub product will be generated in sub product drop down. using javascript I …

Member Avatar for subrata_ushasi
0
268
Member Avatar for Persi

While displaying the data from the database on a text box, I can access only the first part of the name. For example, if the name is 'Five Star', only the name 'Five' is displayed. Can you help in this? I'm just a beginner. This is the code i've used …

Member Avatar for Persi
0
4K
Member Avatar for arihantphp

In this code to upload multiple images to a different folder each time, it creates a new folder and moves files to it, but the validation part is not working ! if i remove the validation part the files are uploaded correctly!! I have mentioned using comments that in which …

Member Avatar for arihantphp
0
451
Member Avatar for eduard77

I was installing pear using pyrus.phar from the command line. everything is ok but when I try to use it I find nothing. I need the pear/Exceptions.php extension. I open the folder where I installed pear and I've found nothing. I don't know what I did wrong

Member Avatar for pritaeas
0
91
Member Avatar for kutchbhi

This is the project I am reading from . [url]https://github.com/sasatomislav/PHP5-OOP-Cart[/url] [CODE] class Cart { <snip> private function __construct() {} /** * Fetch Cart instance * * @return Cart */ public function getInstance() { if (NULL === self::$_instance) { self::$_instance = new self; } return self::$_instance; } } <snip> // initialize …

Member Avatar for pritaeas
0
265
Member Avatar for martymaven

I want to select records from my table which have a date which is older than 200 days. The following code calculates that date and displays it on the page as '2011-08-10': [CODE] $todayDate = date("Y-m-d");// current date echo "Today: ".$todayDate."<br>"; //Subtract 200 days from today $rptdate = strtotime(date("Y-m-d", strtotime($todayDate)) …

Member Avatar for karthik_ppts
0
123
Member Avatar for Kognition

This is boggling my mind. I wrote a quick auto-loader and it appears to work like it is supposed to, except that it keeps changing the argument $class from the class name to "self". Here is the code (followed by further information on what I've tried): [CODE] public static function …

Member Avatar for Kognition
0
112
Member Avatar for gopi17

Hello all, Guys need some advise and some help regarding displaying data from database... so, basically this is what i'm trying to do, have a keyword (invoice_no)...i'm suppose to search the database, and the find record...the display the remaining attributes (document_no,pallet_no and so on) invoice.php [CODE] <FORM ACTION=".php" METHOD=get> <h1>Enter …

Member Avatar for gopi17
0
148
Member Avatar for webwiz

I have a strange problem with testing file_exists. When I hardcode the file name 007-PCSafety.zip file_exists works fine but when I post the filename 007-PCSafety.zip it doesn't recognise the file exists. here's the code. I'm swapping the $p variable to test. [CODE=php] if($_POST){ $url = $_POST['dl']; $filename = basename($url).PHP_EOL; $p=$filename; …

Member Avatar for webwiz
0
1K
Member Avatar for anthonyjpv

Im trying to swap the values if taken already but its not working heres the code: [CODE]<?php ob_start(); require_once("../session.php"); require_once("../functions.php"); require_once("../../includes/connection.php"); include_once("../../includes/header.php"); confirm_logged_in(); if(isset($_GET['cat_id'])) { $category_id = $_GET['cat_id']; $result = get_specific_category($category_id); while($row = mysql_fetch_array($result)) { $category_name = $row['category_name']; $position = $row['position']; $visible = $row['visible']; } } if(isset($_POST['Submit'])) { $errors = …

Member Avatar for anthonyjpv
0
223
Member Avatar for showman13

I know I should know the answer to this, but I'm drawing a blank... I have a conditional statement that checks for the value of a variable, and if it isn't 'Y', then it does a redirect using the header statement. apparently something that I did a couple days ago …

Member Avatar for showman13
0
296
Member Avatar for infinitus

Hello guys ;) Im quite new to PHP and i run into a problem. I was given a PHP task to do and its got to be submited by 27th this month in my uni... unfortunately i was not attending any Web programming class as i was so into Java …

Member Avatar for infinitus
0
233
Member Avatar for cr7489

i have 2 methods to check if words appear within a piece of text, the method only checks for a word once but i want it to check more than once [CODE] while ($pos_words = mysql_fetch_assoc($pos)) { if (strpos($review_text, $pos_words['word']) !== FALSE) { $good++; } } //Get negative words and …

Member Avatar for diafol
0
234
Member Avatar for scarcella

Hi all, I have just coded this for my website, is there a way to improve this either by extending for a more general use or just improving my logic's. Thank you in advance. [CODE] function removeEmptyArray($array, $remove_null_number = true) { $new_array = array(); $null_exceptions = array(); foreach ($array as …

Member Avatar for scarcella
0
88
Member Avatar for eduard77

I am having a script that starts like this require_once "XML/RSS.php"; In the ini.php the path is set to "include_path = ".;d:\phpincludes" where I have an XML folder that contains the RSS.php file When I try to run it I keep on receiving the error Warning: require_once(XML/RSS.php) [function.require-once]: failed to …

Member Avatar for eduard77
0
139
Member Avatar for Waldema

Hi! I've been thinking about how to get this idea work: I have a table in my page. Four columns and several rows. Columns are (1) a product name, (2) how many needs to be purchaced, (3) how many already have been purchased and (4) a submit button which should …

Member Avatar for Waldema
0
89

The End.