39,320 Topics

Member Avatar for
Member Avatar for rakwel10

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"); …

Member Avatar for rakwel10
0
142
Member Avatar for Who me?

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 …

Member Avatar for Who me?
0
119
Member Avatar for videoscape

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 …

Member Avatar for videoscape
0
200
Member Avatar for Meonia

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 …

Member Avatar for Meonia
0
226
Member Avatar for dwlamb

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 ( …

Member Avatar for dwlamb
0
678
Member Avatar for rowen17

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!

Member Avatar for eXpertPHP
0
85
Member Avatar for binu_ds

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>'; …

Member Avatar for vibhaJ
0
129
Member Avatar for Sparhauoc

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 …

Member Avatar for Sparhauoc
0
588
Member Avatar for Buppy

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 …

Member Avatar for Buppy
0
88
Member Avatar for chandru7
Member Avatar for tiggsy
0
104
Member Avatar for uselessninja

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 …

Member Avatar for calebcook
0
339
Member Avatar for rakwel10

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 …

Member Avatar for rakwel10
0
139
Member Avatar for rakwel10

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?

Member Avatar for cereal
0
299
Member Avatar for tapuwa2002

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

Member Avatar for diafol
0
124
Member Avatar for ashneet

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.

Member Avatar for Balajipala
0
407
Member Avatar for EW12
Member Avatar for EW12
0
212
Member Avatar for alimziyan

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 . " …

Member Avatar for alimziyan
0
167
Member Avatar for karthik_ppts

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?

Member Avatar for karthik_ppts
0
7K
Member Avatar for 54uydf

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 …

Member Avatar for 54uydf
0
956
Member Avatar for agr8lemon

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); …

Member Avatar for agr8lemon
0
151
Member Avatar for rakwel10

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?

Member Avatar for diafol
0
124
Member Avatar for Chub97

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 …

Member Avatar for sv3tli0
0
363
Member Avatar for Chub97

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 …

Member Avatar for Chub97
0
174
Member Avatar for shella

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 …

Member Avatar for eXpertPHP
0
131
Member Avatar for extemer

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 …

Member Avatar for sv3tli0
0
150
Member Avatar for stevenbaron1

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. …

Member Avatar for stevenbaron1
0
165
Member Avatar for rayden150

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, …

Member Avatar for sv3tli0
0
115
Member Avatar for mrhankey

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 …

Member Avatar for mrhankey
0
114
Member Avatar for ashking

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)) { …

Member Avatar for pritaeas
0
129
Member Avatar for phaedrusGhost

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 …

Member Avatar for phaedrusGhost
0
125

The End.