39,316 Topics

Member Avatar for
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
115
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
113
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
183
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
129
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
124
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
78
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
125
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
370
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
326
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
104
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
96
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
117
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
111
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
221
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
176
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
190
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
272
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
157
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
148
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
264
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
440
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
262
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
118
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
109
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
144
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
220
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
293

The End.