39,320 Topics
| |
Im having a problem with my code. When I run it to php4 and it works fine. Then I tried it to php5. Im getting error -[COLOR="Red"]"Undefined Variable: _Session in ..."[/COLOR] [CODE]<?php session_start(); function logged_in() { return isset($_SESSION['idnum']); return isset($_SESSION['user_type']); return isset($_SESSION['fname']); } function confirm_logged_in() { if (!logged_in()) { redirect_to("index.php"); … | |
| Hi, I new to PHP. I've searched all over, but with no luck. My objective is to build an array of variables that contain HTML links. (One html link per variable). Then I want to output the variables, (containing the links), so that a new random variable loads each time … |
i can't get my head around how i am suposed todo this really i am stuck i have looked on tons of forums mostly this forum and what i would like to do is if a person goes on this link play?p=rLoYvtMNlO then it will load the data from that … | |
Hi, I'm doing a check against HTTP_REFERER after a simple form is submitted, just as an additional security measure. What's happening is that the check always fails when the script is running on the remote server, but works as intended if I test it on my localhost server. Here's the … | |
I have an array that is multidimensional and I need to test whether an offset exists. My reading of the PHP manual for array_key_exists makes sense for a single-dimension array. My script takes results returned from the database and arranges them this way: [code=php] Array ( [1] => Array ( … | |
hi guys, im trying to loop a variable using 00 format.. ex. 01,02,03,04.......31 im going to use this for my dropdown of date. thanks! | |
Hi How will insert the string data into the database?My code is <?php // example of how to modify HTML contents include_once('simple_html_dom.php'); $submit_url= 'http://yellowpages.sulekha.com/agra/abhay-integrated-technology-ltd-sadar-bazar-agra_contact-address.htm?business=pst'; $html = file_get_html($submit_url); foreach($html->find('img') as $e) $e->outertext = ''; // replace all input foreach($html->find('input') as $e) $e->outertext = '[INPUT]'; foreach($html->find('div#div.core_add') as $e) echo $e->innertext . '<br>'; … | |
Greetings all. First of all, let me say I am NOT asking for code, just to be pointed in the right direction. I’m a newbie in php and mysql and have been teaching myself what I could learn from online lessons and tutorials (mostly w3school.com). I have found plenty of … | |
Hi, A little help here needed - i want to make a class variable (array). Some values are expected to be from a session variable. Example [CODE] public $myArray = array( 'key1' => 'something', 'key2' => $_SESSION['something_else'], ) [/CODE] With this i get an error about unexpected variable. Aynone knows … | |
Anyone please advise what is the best payment gateway for php website and how to integrate in php website. | |
hi everyone i have a search page that will search base one date... but if i search with only date (9/27/2011 ) it will only display the data from database that has the same date and time but not the whole data in that specific date: example: in my database … | |
I have a date picker that give me this result: e.g. 2011-29-08 When it is inserted in mysql, it outputs '0000-00000'. What can I do? I know "strftime("%Y-%m-%d %H:%M:%S", time());" But I have no timestamp to put as an argument. The only data I can use is the data that … | |
Im creating a time-base site wherein the timestamp should rely on the global time and not to my PC's time (because it can be out-dated somethimes). How can I do that? | |
Hey Am new to PHP need help, if I want to create a list, and only want to add an item one below the other what would be the best method in using Sessions. If there any examples that would really help. Thanks | |
I am new with session. What i am trying to do is that if someone doesn't visit my site for lets say 5 day i want the session to expire. is there a way to do this as i am not aware of it. | |
Which one should I install on my desktop? EasyPHP or AMPPS? | |
Hi I am using a php script for converting avi,mpeg files to flv with ffmpeg.my code is [CODE]$srcFile = "uploads/flame.avi"; $destFile = "uploads/flame.flv"; $ffmpegPath = "/usr/bin/ffmpeg"; $flvtool2Path = "/usr/bin/flvtool2"; $ffmpegObj = new ffmpeg_movie($srcFile); $srcWidth = 320; $srcHeight = 240; $command = $ffmpegPath . " -i " . $srcFile . " … | |
Hi frendz, Can we set a value for a session variable through javascript onclick event? (or) How can we set a global variable for the whole website using javascript? | |
HELP! I lost count of how many editors I tried! I don't understand why non of them work. I'm trying this editor [url]http://nicedit.com/index.php[/url] very simple. but when I type words in the textarea and click submit nothing is saved in the DB..empty that's what I get. all I want is … | |
Hello, I'm trying to do a very basic page that allows me to edit a single column in a MSSQL database. For whatever reason I can't figure it out and am hoping that you can help. Here is my front page (sorry about the silly names) [CODE]$ninja_conn = odbc_connect('XXXXX','XXXX','XXXX', SQL_CUR_USE_ODBC); … | |
I want to get the [B]file extension only[/B] of a file. e.g. "myfile.jpg", I want to put in a variable the string ".jpg". How? | |
I have seen on many sites using PHP some sort of id system where they can have a main page and then have different ids that will display completely different content. I am just wondering how you do this as I am in the process of making a screenshots gallery … | |
I am having a bit of trouble with general PHP video uploads and then converting them into a FLV flash file for playback. I have heard something about installing something called FFMPEG but I cannot not find any tutorials any where for doing this. So basically what I am looking … | |
Hi guys! I'm working on a script to manage newsletter and I'm actually thinking how to manage eventually freat amount of mail deliveries when they are sent. What I mean if that i'm pretty sure that send something like thousands emails at once could be seen as spam from server … | |
hello guys i am stuck in a small but horrible problem.i am redirect page to itself using [ICODE]$_server[''PHH_SELF][/ICODE] method but the problem is that i apply the insert query at the top of my html page but it shows me that you are not connect to the DB. [CODE] <?php … | |
Hi Guys, I noticed that in some apps people tend to use the following method in classes without instantiating an instance or defining objects, but this works, could someone explain whether this is a correct way of doing it. (its for a simple data management and interface app) For eg. … | |
Im trying out php to help me on the logic side with my form but the php is just not working, The folder is on the desktop, its not in the XAMPP directory, I saved it as a php file, and still nothing the only thing I could think of, … | |
hi, i have asked something similar to this before. basically i have looked around and i can see that it seems it is possible to send email from a different email account using php. but what is the best way to stop the server being blacklisted? it want be used … | |
Hi I am quite new to php programming but I have started a new personal project which I need a bit of help/advice on it please. This piece of code randomly picks a line within the file: rand.php [CODE]<?php $filename = 'file.pwf'; $how_many_to_show = 1; if ($fileContents = file($filename)) { … | |
Hi all, For some reason I can't seem to wrap my mind around JOINING tables and getting the data I need from this. I have three tables I am trying to join. I need to count the number of blogs, comments and number of views for each user. I have … |
The End.