Php

Advertisement

Using A Function In A Array

Using A Function In A Array

I wanted to use a function in a array in my template system, and its working but its generating the function output before everything else. I don't know why this is happening when I use variables its displays exactly where I want it.  If there is a b
Set Function For Each Array

Set Function For Each Array

Now I use: <?php $_POST = array_map(mysql_real_escape_string, $_POST); $_GET = array_map(mysql_real_escape_string, $_GET); $_COOKIE = array_map(mysql_real_escape_string, $_COOKIE); $_REQUEST = array_map(mysql_real_escape_string, $_REQUEST); but if $_
One Array To A Function

One Array To A Function

i need to pass two arrays to a function. then i need to modify them in the function, and return them. something like this. Code: function do_this_or_that($array1, $array2){ do something with the arrays return $array1, $array2 } $array1 = array(1,2,3,
Get Array Into Function

Get Array Into Function

I experience a strange behaviour as follows: $getmodules = mysql_query("SELECT module FROM modules") or die(mysql_error()); $modules = array(); while($row = mysql_fetch_array($getmodules)) { $modules[] = $row['module']; } print_r($modules); // t
Which Array Function?

Which Array Function?

I have a file containing only UNIX timestamps that I pull into an array with file($myarray) 1157950336 1157950334 1157949470 1157948606 1157947742 1157946878 1157946014 I need to get a count of timestamps that fall between specific times - those that
PHP_SELF Name The File Name Of That Same File.?

PHP_SELF Name The File Name Of That Same File.?

instead of doing <?php $_SERVER['PHP_SELF']; ?> can i just name the file name of that same file.? so im workign on index.php, and i want the action to be in index.php? or do i have to put PHP_SELF if i do some php in the file.
Can I Trust $_SESSION ?

Can I Trust $_SESSION ?

Can I trust $_SESSION globalvariable? I have a script that only checks if it has $_SESSION["userid"], if it does have then it continues without password checking. Can anyone fake $_SESSION ?
Error About Object Id #2

Error About Object Id #2

I am really struggling to get some login stuff working. I figured out how to put in some error handlers and exception handlers. Now when my form passes the values to the member.php5 page for processing I get the following exception message. Code:
Problem With Array For Png Imagefilledpolygon

Problem With Array For Png Imagefilledpolygon

I'm drawing a 4-point polygon for a png. I pass an 8-value array, $values, to imagefilledpolygon() to plot the poly. It doesn't work. I create an identical(?) array, $valuestest, and it does work. I do a var_dump for both and they appear identical. C
Help With Include Please

Help With Include Please

I have this code: <? required("style.php"); ?> and it wors fine, but when I click view source code in browser, the style properties are shown. Is there anyway to hide them.
Php-mysql-5.0.5.i386.rpm

Php-mysql-5.0.5.i386.rpm

can anyone tell me where I can download the above package? I can't seem to find it anywhere.
Problem With Multipule Files Uploading

Problem With Multipule Files Uploading

<?php $numOfUpload = $_POST['numOfUpload'];//Number of files to be upload submitted from previous page for($i=0; $i<$numOfUpload; $i++) { $fileName =$_FILES['uploadFile'.$i] ['name'];//uploadFile is field name from previous page echo "<br>
Get The Data Out From The Database?

Get The Data Out From The Database?

I have made a script that can insert the data to the database but i can't get it out with my codes! I have chekked that names with tables, and rows are correct, but with no result! [code]....
Can&#039;t Add Data To The Database?

Can&#039;t Add Data To The Database?

I had this working and now after some changes it will not add the data to the database. I get no error. When I run the MySQL in phpMyAdmin it adds it. Here is what I can run via phpMyAdmin: INSERT INTO `employee`(`Emp_Id`, `FirstName`, [code]......
Put In Some Data Into A Database?

Put In Some Data Into A Database?

I'm trying to put in some data into a database, and then use AJAX to make that data appear on the same page that the submission form is on. If I submit something with no filtering/fixing of any sort, my console gets this returned to it: foo\\'bar (5
Getting Data From A Database?

Getting Data From A Database?

I have got a small problem on the datas which are coming from my database Ok it is not a real problem . A part of my website do contain some articles and i want to view only the titles of the articles, that is easy but the problem now i want when som
Getting Data From Database Using XML?

Getting Data From Database Using XML?

Is there a approch where we can get data from database using XML instead of mysql_query() (database drivers ?) in PHP
Getting Data From SQL Database?

Getting Data From SQL Database?

I have some php that is reading to a sql database that contains our subscribers information. What I need it to do is read the field "last" and then if their name is not in the data, then I need it display an error code. If it matches, than it wi
PHP/MySQL Search Script

PHP/MySQL Search Script

I have a MySQL db containing about 8 different rows (manufacturer, product, condition, and so on). I've constructed a search page that searches based on specific form data posted. Now, I want to add an advanced search, of sorts, as simple as yahoo or
Multiple Form Problem?

Multiple Form Problem?

i have a page which includes 3 links in the form of tabs . <general> <config> <settings> are the three links in a page and if u click on any of the tabs then that particular form is displayed below the links showing that tab as active in