39,388 Topics
![]() | |
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 … ![]() | |
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] ![]() | |
![]() | 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 … ![]() |
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 | |
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 … | |
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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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); … | |
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 … | |
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 … | |
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']!='' && … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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)) … | |
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 … | |
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 … | |
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; … | |
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 = … |
The End.