Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Form, Type=file And Identifying By Isset()


Windows XP
PHP 4.4.2
Apache 2.2
Register_Globals = Off
Safe_Mode = On
-----------------------
Hi All,

I am having a problem getting a file browse input field to be recognized on the next page. Let me show you...

page1.php Contains a web form with a file input to attach a file using a browse button.

<form method='POST' action='page2.php' enctype='multipart/form-data'>
<input name='uploadFile1' type='file' id=uploadFile1'>

page2.php contains a validator to check the input and perform an action based on whether or not the browse input field has been populated.

// IF THE POST CONTAINS A FILE UPLOAD, PROCESS SECTION 1 IF NOT PROCESS SECTION 2.

if (isset($_POST['uploadFile1'])) {
echo "File is attached so print this.";
}

if (!isset($_POST['uploadFile1'])) {
echo "File is NOT attached so print this.";
}

If the user uses the browse button on the form page to populate the field with a file path to a file on his pc, then I expect to see the "File is attached message". However, regardless of whether someone does or does not browse a file, the message is always that they have NOT browsed a file and the variable "uploadFile1" is effectively left unpopulated.

OUTPUT
File is NOT attached so print this.

Conversley, I thought I might be able to use the _FILES variable instead of _POST, but I get the exact opposite, that the browse field is populated all the time whether or not someone has browsed a file or left the browse field blank.

if (isset($_FILES['uploadFile1'])) {
echo "File is attached so print this.";
}

if (!isset($_FILES['uploadFile1'])) {


OUTPUT

File is attached so print this.

So, I am missing something. Can someone give me some direction so that I can simply identify (with register_globals = Off) whether or not an input field (input type=file) has been populated or left blank? Is this even possible? What am I missing?




View Complete Forum Thread with Replies

Related Forum Messages:
Identifying Dynamic Form Fields
User goes to page which is a form that asks for some basic info regarding returning products for credit/exchange, and also asks for how many products are going to be returned. Upon submitting, a return authorization form is presented to them with the specified number of product fields. I now want to take the input from this form and email it to myself, as well as, display a confirmation page to the user. The problem I have is a can't say, for instance, echo "$field_name"; because field_name will get created dynamically after the user specifies how many products to return. For example, say the user says 5 products, this will generate a form with field names like:

return_code0 inv_num0 qty0 product0 cre_exch0 stockout0
return_code1 inv_num1 qty1 product1 cre_exch1 stockout1
return_code2 inv_num2 qty2 product2 cre_exch2 stockout2 and so on....

These get created with a for() loop. Once this form is submitted, how can I address the field names? Code:

View Replies !
Show Stored Value For Form Field Type=file
I have a file-uploading form to uploads a .jpg file and stores its name in a table in my db as co_bannerfile. I'm trying to now write an update form so the user can update their .jpg file. I've successfully written a query to retrieve the stored file's name.

How can I display the stored file's name so the user can see its name within the input TYPE="file" field and then decide to update it or not? The following doesn't display the stored file name. What do I have wrong? Code:

View Replies !
Checking Blank Form Field Where Type = FILE?
I am having problem with form checking, if the form input field is a file browser for file to upload: PHP Code: <input name="Picture" type="file">

Can I still use the standard check to see if the field is blank? This is what I use right now and I am not sure if it is working properly Code:

View Replies !
<input Type=file> How To Update Form Data In Mysql
i have been struggling with a problem with file uploads and mysql for a while on and off and have recently dug out my php bible to learn some more i figured out, after a lot of reading and hours of trial and error, how to use a html form to upload text and file paths into a mysql database.

i`m a relative newbie, so i`ve not had time yet to try everything out. my problem is when i use <input type=file> i save the path to an image etc that i have uploaded in a mysql db, but if i want to change any of the text data within my form i cannot keep the image path in the db, but i have to browse for the image again or it will be a broken link? Code:

View Replies !
Identifying Non-Supported Characters In A TTF File With GD?
I've managed to get GD working (mostly anyway) on my site - and am utilising the "imagettftext" function.

I am using this function to display individual characters on my website - with a nominated Font.

However, sometimes the characters in my StringText are not supported by the particular font that I am using ...

Directly from http://www.php.net/manual/en/function.imagettftext.php

imagettftext - "If a character is used in the string which is not supported by the font, a hollow rectangle will replace the character."

Can anyone suggest some code that would:

1) compare/look at the StringText supplied within the "imagettftext" function (in my case the StringText will comprise of a single character only)

2) where the supplied StringText (ie character) is NOT supported by the font, then I need for that character to be reported as not supported. ie. either; return a flag or skip the non-supported character entirely - rather than displaying the standard "hollow rectangle".

View Replies !
Form Type=submit Vs Type=image
I'm wanting to create a form with quite a few SUBMIT buttons that use an image rather then the stock (plain grey) button. Everything works fine when I use this line:

print "<INPUT TYPE="submit" NAME="editaction" VALUE=$id>";

I know which SUBMIT button was pressed by checking the value of $editaction in the receiving page. Now if I replace that line with this one:

print "<INPUT TYPE="image" SRC="icon.gif" NAME="editaction" VALUE=$id>";

I no longer get a value in $editaction. I know about $editaction_x and $editaction_y. Is there no way get to the 'VALUE' (from the VALUE=$id part) as well? Am I missing something? Has the variable name been modified to somthing like $editaction_value?

TIA for any light you can shed.

View Replies !
How The Pre-fill The <input Type="file" /> Field Of A Form.
On a user workstation there is a file linked to many other files. The user
upload this file to my server. I can build a list of these files. But I
don't know the path to these files on the workstation. PHP does not give
this information. I am looking for a simple solution from the user point of
view for him to send me all these files.

Because I don't know the path to the file, I can ask the user to type the
path in a dialog box.

I don't have, from the server, a possibility to upload the files on the
workstation. And I don't know how the pre-fill the <input type="file" />
field of a form.

View Replies !
Using Isset To Run Some Php When Form Is Submitted.
I am trying to modify the login script one of the moderators here pointed me to.  It looks like it is working for me but I need it to only run after someone submits the form.  I tried adding isset, but when I did it just post back and does perform the query. Code:

View Replies !
Form Validation ((isset($_POST
PHP Code:

if ((isset($_POST["MM_update"])) == "NW") {

              $DP = $_POST['DP'];
            $DR = $_POST['DR'];
            $DF = $_POST['DF'];
            $PPN = $_POST['PPN'];
            $Model = $_POST['Model'];
            $Serial = $_POST['Serial'];
            $EN = $_POST['EN'];
            $Hours = $_POST['Hours'];
            $Customer = $_POST['Customer'];
            $Application = $_POST['Application'];
            $Material = $_POST['Material'];
            $JL = $_POST['JL'];
            $status = $_POST['status'];.....

View Replies !
Using!isset() And Empty() To Check For Required Form Field
I was reading the "Basics of Submitting and Emailing Forms with PHP" post by jatar_k in the Library and came across how both!isset() and empty() are used to check against a required form input field.

if (!isset($_POST['firstname']) ¦¦ empty($_POST['firstname'])) $errmsg .= "<p>Please enter your first name";

According to jatar_K, the line checks to see if the variable is set and has a value in it.

My question is: doesn't!isset() alone do the job already? why use empty() also? According to php.net, isset() checks to see if a variable is set (if the variable exits and has a value in it).

empty() is used also is it because isset() returns TRUE even if the variable has an empty value? So using empty() adds another layer of error checking to it.

View Replies !
File Upload :: 'wrong File Type' On Another Server
doing a simple image (jpeg) upload to a directory. Have a script which works fine on one server but comes up with 'wrong file type' on another server. The server that works has php5 installed, the other is 4.2.2 but I am sure what I have should work on both.

PHP Code: ......

View Replies !
File Upload NOT Using HTML Input Type=file
in an earlier post on the javascript forum i was talking about a small program i'm writing to allow file uploads through the http protocol that look and function similar to a ftp client.

I have made some nice progress on this project and am able to return the FSO collection from the client pc. this allows me to list of directories on the page so users can select multiple files to upload at once or even entire directories. Code:

View Replies !
MIME-Type + Form
I get this message after submitting my php contact form. Why is this?

MIME-Version:... List:; syntax illegal for recipient addresses Content-type:... List:; syntax illegal for recipient addresses

Here are my headers: PHP Code:

$headers = "MIME-Version: 1.0";
$headers .= "Content-type: text/plain; charset=iso-8859-1";
$headers .= "From: '$name'";

Also how do I ensure that the from field will be the senders name?

View Replies !
Form GET Variable Type
Is there a way to make sure that the value entered into a text input is an integer (without using Javascript or some such nonsense)? I have a text input that should be only for integers, but even when you type a number in, PHP recognizes the passed variable as a string.

View Replies !
Display File Type Of Upload File
How do I display the file type of an uploaded file, in order to find out what mime type to use?

View Replies !
How Can I Check File Type Of The Local File?
How can I check file type of the local file. The file is already uploaded.

View Replies !
PHP Select Form Input Type ?
I want to be able to manipulate the order of data queried from mysql. The problem I am having is with the select input type for some reason I cant get it to recieve a value in an array? Code:

View Replies !
Form, Input Type To Be An INTEGER
where "XXXX" needs to be an INTEGER instead of "TEXT" anything else.

<form method="post" action="myphpfile.php">
<input type="xxxx" name="quantity">
<input type="submit" name = "submit" value="quantity">

View Replies !
Does Anyone Declare A Different Data Type On Every Input In A Form?
I'm trying to read up on the rfc's that govern form inputs. Much of
what I'm reading is stuff I didn't know before and some of it is
alarming. This one left with me questions:

Is this (below) addressed to me as a web designer, or is this
addressed to the makers of web browsers? Identifying the type of file
being uploaded seems way outside of my scope as a PHP coder. Am I
suppose to make clear the expected type of content when I design a
form? Off hand, I can only think of two things that every go into an
HTML form: strings and binary data. Should I actually label every
INPUT with the expected type (does anyone do this?), or can I assume
the makers of web browsers have already done that for me? My PHP form
code is fairly concise, so I could add in mime/text rather easily, but
is it necessary? Surely the browser knows that everything save binary
files is a string?

They wrote:

3.3 use of multipart/form-data

The definition of multipart/form-data is included in section 7. A
boundary is selected that does not occur in any of the data. (This
selection is sometimes done probabilisticly.) Each field of the form
is sent, in the order in which it occurs in the form, as a part of
the multipart stream. Each part identifies the INPUT name within
the
original HTML form. Each part should be labelled with an appropriate
content-type if the media type is known (e.g., inferred from the
file
extension or operating system typing information) or as
application/octet-stream.

They give the example below. Am I right to say that I don't need to
think about any of this, that the web browser does all this
automatically? The browser figures out that file2.gif is a gif image
that needs to be sent with a the header Content-type: image/gif, yes?

If the user also indicated an image file "file2.gif" for the answer
to 'What files are you sending?', the client might client might
send
back the following data:

Content-type: multipart/form-data, boundary=AaB03x

--AaB03x
content-disposition: form-data; name="field1"

Joe Blow
--AaB03x
content-disposition: form-data; name="pics"
Content-type: multipart/mixed, boundary=BbC04y

--BbC04y
Content-disposition: attachment; filename="file1.txt"

Content-Type: text/plain

... contents of file1.txt ...
--BbC04y
Content-disposition: attachment; filename="file2.gif"
Content-type: image/gif
Content-Transfer-Encoding: binary

...contents of file2.gif...
--BbC04y--
--AaB03x--

If I wanted to send multiple
files as part of a form input, how would I use the multipart/mixed
header, or the "content-transfer-encoding" header? Can anyone point me
to an example, so I might have a better chance of understanding this?

As with all multipart MIME types, each part has an optional
"Content-Type", which defaults to text/plain. If the contents of a
file are returned via filling out a form, then the file input is
identified as the appropriate media type, if known, or
"application/octet-stream". If multiple files are to be returned
as
the result of a single form entry, they should be represented as a
"multipart/mixed" part embedded within the "multipart/form-data".

Each part may be encoded and the "content-transfer-encoding" header
supplied if the value of that part does not conform to the default
encoding.

View Replies !
Search For Variable And Replace It With What I Type In The Form?
I have an HTML file with this piece of code:

<img src='/phpfundthermo/thermo.php?max=3000&current=1300'>

What this code does is invoke the file thermo.php and sets variables "max" and "current", effectivley displaying a thermometer that is about 1/3 full.

What I would like to know is, how can I build a form that will replace whatever current equals.  Right now it equals 1300.  I could use "find and replace" but what if I don't remember what the current variable currently equals?

Is there a way that I can build a form that would search for that variable and replace it with what I type in the form?

View Replies !
Form Input Type =Image Not Passing In IE
A form with images as input fields. I would like for the person to click on the image and that submits the form. I've got it working and passing the value of the variable in Safari, Firefox and Netscape but not IE. The variable gets passed to the database and the next page in all the mentioned browsers except IE. I need a work around asap.

View Replies !
Generic Form Handler, Input Type
If i have no idea what is in the form that is being sent. How can i find out the type of input that the data is coming from?

ie;
<input type="text" ...
<input type="password" ...
<input type="radio ...

Is it possible?

Basically what I am doing at the moment is looping through the $_POST array and getting all the data, but i want to be able to tell what each of the form elements is.

View Replies !
Problems Sending Arrays By Form When Type=checkbox
I have a problem when I try to send an array using a form when
the type="checkbox".

This is my form input row:

<INPUT type="Checkbox" name="flg[]" value="y" <? if($row['flag'] ==
'y') echo 'CHECKED' ?>>

Since this is an update form, I set the status of the flg[] according
to the field "flag" stored in a MySQL database. The user may check or
uncheck each of the checkboxes on the form.

This form is sent to another PHP file with other fileds of type
<SELECT> and type="Text". Here's the code which process the checkbox
input:

$max_i = count($flg);
for($i=0;$i<$max_i;$i++)
{
if($flg[$i] == 'y')
{
$flag = 'y'
}
else
{
$flag = 'n'
}
echo $i.'-->'.$flg[$i].'-->'.$flag.'<BR>'
}

I have no problems processing the array associated with the SELECT
and "Text" fileds, but when I try using the Checkbox, this is what I
receive:

0-->y-->y
1-->y-->y
2-->y-->y
3-->y-->y
4-->y-->y
5-->y-->y

Trying with this other code:

$num_of_checkbox_fileds = 12;

for($i=0;$i<$num_of_checkbox_fileds;$i++)
{
if($flg[$i] == 'y')
{
$flag = 'y'
}
else
{
$flag = 'n'
}
echo $i.'-->'.$flg[$i].'-->'.$flag.'<BR>'
}

I receive this output:

0-->y-->y
1-->y-->y
2-->y-->y
3-->y-->y
4-->y-->y
5-->y-->y
6-->-->n
7-->-->n
8-->-->n
9-->-->n
10-->-->n
11-->-->n

View Replies !
Form Processing Problem With Input Type=image!
In this message some time ago some of you were discussing Form processing problem with input type=image. I myself have just had exactly the same problem. I tried the fix mentioned in the post:

With image submits, you'll get 2 name/value pairs when the button is clicked. For 'restore', the browser will send 'restore.x' and 'restore.y', and the values are the x/y coordinates of where they clicked on the image. Code:

View Replies !
Outputing A Form To A Document Image Or Acrobat Type
I have a actual paper form for people to apply for a Bowling league, but I want to make a web form, and upon entering the info in all the fields, the user clicks submit, which takes it to the next page of an image of the actual form, with all the fields populated with the data entered. Of course, that data would also be stored into a database.

(e.g. the user entered name, address, phone, etc. the output result is an actual image of the paper application form (scanned jpg or tif, etc), but all the areas are populated with the data of name, address, phone, etc.). The user can then print this form, and avoid using a pen to write in all the data.

View Replies !
Parse Error With "if (isset($_POST['min']) && Isset($_POST['max'])"
I'm making a form where one of the results is created by a range of dates. I have 2 drop down boxes that are populated with "date" data from the table and they pass it onto the results page using the "Post" method. My host is Godaddy / Linux and my table is MySQL ver 4.1 Code:

View Replies !
File Type
i'm having a problem with a file type it's a news index file .nzb file i can upload it ok, and it's in my database as filename.nzb , i can see it on my server as filename.nzb , but when i go to download it to my desktop it turns into filename.xml, my files allowed code is:

$file_accepted = array("text/xml","application/octet-stream","application/x-gzip-compressed","application/x-xml");
through testing i have seen that the nzb's mime type is:

text/xml
is there anyway to download as an nzb , everytime i try i get filename.xml

View Replies !
Type For .PHP File
i found many ways to force download in PHP by googling. but i difficult to force download PHP file. I've searched mime type for php but nothing, just asp (text/asp). what is mime type for php file so i can force download .php file?

View Replies !
To Get A File Name, File Size, File Type...?
Is there a way to get information about a file BEFORE it is submitted to the server?
I am trying to make a upload progress bar from scratch WITHOUT THE PRON.C PHP FIX!!!
I found the file being uploaded in my NET://WINN01910//TEMP folder and I can outputs its file size in a popup with a one second refrehs, but this makes it so the USER needs to know the full file size to know if its anywehre near done. 

Is there a way to get the filesize from the clients side?  Possibly javascript that uses ajax to submit the values to the server before the file is sent but when it is selected?? Is there an easier way to do this and/or do you have any ajax example code of how it might work?

I also have another problem, Althoguh i can echo the filesize of what is recieved so far, I am just glob()ing the temp folder for: "php*.tmp" but is there a way to tell the tmp file so they don't see everyone's uploads?

View Replies !
Multiple File Upload From Client Pc To Server Without Using <input Type="file"> Cont
I am working on a application which requires me to upload the contents of all the files from a particular folder in clent pc to the server.

In my code i just want to mention the folder name which may contain any number of files.Folder name will always be fixed.
I dont want to use <input type=file > control.

Is there any way i can achieve this using FTP or any other way in PHP.Any help will be greatly appreciated.

View Replies !
Identifying Browser
Is there a way to identify the brwser a visitor to my site is using?  I would like to include site style based on the visitor's browser.   If their us IE show layout one way, if their using Firefox show it another  way...etc...etc.

View Replies !
Identifying People
on my website i'm finding people are coming back and signing up again and again... how can i log them so i know who has logged in before. was thinking IP but does this not change per session online with dial up?

View Replies !
Identifying A Value Range
i have a form that submits to a php file, the form basically has a hidden field called number:

<input type="hidden" name="number" value="12">

i know how to read the value of that, its simply putting <?php echo $_POST['number']?> but what i want to do is check if the number is between 1 and 25 and if it is then echo A else if it is between 25-75 then echo B else if it is anything above 75 then echo C .

View Replies !
Identifying SSL Clients
I have a site that uses PHP sessions through SSL, my employer does not wish the site to require cookies so I have switched on the use_trans_sid option for users who have cookies disabled. The problem I have is stopping session hijacking.

If I am on a page "https://secure.mysite.com/page.php?PHPSESSID=XXXXX"

And I email the url to someone else they can get onto the site without being challenged for a logon. I am trying to find a way to check that the connection is still coming from the same SSL connection, e.g. by checking the clients public key, but I can't find a way to get any information about the SSL connection from PHP.

View Replies !
Identifying An Image
Ive got a tracking system which tracks how many times a user clicks on an advert on my site. At the moment all the listings are set as one so when a user clicks on that advert it gets one click. However, one of the adverts is now going to contain two images advertising two separate companies.

Ive set it up so the images and urls are different and they go to their own websites and in my tracking table i have just added an extra column called image and the number 1 goes in if image 1 is clicked on or 2 if image 2 is clicked on. However, to display this is the bit im not sure about. At the moment its displayed in a table like this:

Advert Name                Category                      Number of clicks

Advert 1                     Shopping                       257

However, if advert 1 has two images, meaning two separate companies, how can I show this in the above table?

View Replies !
FILE Type For MySQL ?
Is there a FILE type in MySQL??? to store files as a column in a registry of certain table?

View Replies !
File Type Is In The Array $ext Or Not
i have this array :

$ext=array ("image/pjpeg" , "image/jpeg" , "image/gif");

i wanna check if the file type is in the array $ext or not, i wrote this :

if($imgtype  !=$ext[0] or $imgtype  !=$ext[1] or $imgtype  !=$ext[2]){
    die("error");
}

the $ext maybe will have more file ext., so i need to change the if term always!

View Replies !
Determine The Type Of A File (gif Or Jpg)
I've written a very basic CMS using a PHP database thing (no MySQL). It lets me update a list of 5 descriptive texts, each relating to an image which is shown next to the text.

At the moment, my HTML looks like this (simplified):

<tr><td><img src="images/Picture1.gif"></td></tr>
<tr><td><img src="images/Picture2.jpg"></td></tr>
<tr><td><img src="images/Picture3.jpg"></td></tr>
<tr><td><img src="images/Picture4.gif"></td></tr>
<tr><td><img src="images/Picture5.gif"></td></tr>

which is very inelegant as I have to repeat all the information.
I've already written the script to create the 5 table rows dynamically, using a "for" loop with the counting variable $i, so that I can simply write one row and substitute the Picture number with the variable: PHP Code:

View Replies !
Checking File Type
I have a page where I can update some entries in a MySQL database and add a picture. The name of the file (added a timestamp) is stored in the database and the file it self in a directory. I have no problems in the uploading part or in database, but when i tried to add file type checking part it went wrong.

The only allowed type should be .jpg/jpeg, but even though it is possible to upload that type something strange happens when trying to upload a non .jpg: It don't return the $mess ("Wrong file-type"), but instead it jumps to the "IF($img == "none") part and inserts the text in database (which it shouldn't) as if the $img is empty! Code:

View Replies !
Input Type = File
If an input field of type 'file' is left blank, what is returned as the varible? I'm having a problem, I have two file fields and want to be able to do the following:

1. Put in the $file1_name and $file2_name (if there was a file uploaded) into a database so I can reference it later.

2. Copy the uploaded file (if, in fact, there was a new one uploaded) to a directory.

3. Later on, if someone wants to edit that entry and wants to upload a new file for the 2nd slot, or 1st for that matter or delete a file, it should do that with no difficulty.
I'm running into problems when it reaches the 'if' clause. I've tried:

if ($var){
and
if($var != ''){

and no matter what, for some reason these blank file fields alwasy evaluate true to my if statements, so I get an error like 'can't open file 'none' for blah blah'.

View Replies !
Mime Type Of A File?
How do I get the mime type of a file on the filesystem?

View Replies !
File Type Checking ...
i'm building a system where i'm uploading some files and checking
the right type of files. Now i'm only allowing the users to upload
pdf, msword and mspowerpoint files. But i need to allow them to
upload Excel, Txt and zip files also.

Can anyone please check and tell me how to do that. I'm using the
following code....

View Replies !
File Type Validation
I am writing a script for uploading files. I want the script to only accept certain filetypes, in order to avoid any bad content. I figured I could do it by checking the MIME-type, or perhaps the file-ending. However, there are quite a number of filetypes I would like to allow, and so I am wondering if I could get some pointers to a more elegant solution than simply "brute-forcing" my way through all the different filetypes.?

View Replies !
Check File Type
I use this to check my files type:

$fileextension = $_FILES['file']['type']; But it returns the files MIME type, such as image/x-png. How can I get it to check the files actual extension? Such as .mp3 and .zip etc.

View Replies !
Explode To Get File Type
I'm pretty baffled at this. I'm not entirely sure why this isn't working:

$filetype= $_POST['file']['type']; // getting the file type
$file  = explode('.', $filetype); // exploding the string to return just the file type
$filename        = rand() . '.' . $file[1]; // renaming it and then adding the file type back to save the file

I'm trying to retrieve the file type seperately and then rename it.

View Replies !
File Type/extension
Ive been trying to figure this out for a while now but I just can't find a function that does it the way it SHOULD. For example, if there is a file in a directory that has the extension *.php or *.html it would echo "php" or "html" .

This way when a member of the site tries to edit a file and save it as *.php the file manager will warn them that they cannot have that file type. I've tried using filetype() but that returns information that is irrelavant.

View Replies !
Put Value Of An Input Type File
im trying to query on the database and display the results as value of the input type file like this code below.

<input type="file" name="uploadfile" value="$row[filename]">

I was wondering why the value didnt appear, even if i try to put a <input type="file" name="uploadfile" value="testing">

anyone has idea how?

View Replies !
MIME Type Of Mp3 File
I'm uploading mp3 files and ofcourse checking the MIME type, and I would expect that the MIME type would be audio/mpeg or audio/x-mpeg. But, instead of that it recognizes the mp3 file as application/octet-stream.

How can that be? I deffinetly not want to allow that type as it would create a mayor security issue. checking for extension is also no option; that's easely bypassed.

Does it have something to do with de ID3v2 information in the beginning of the file? i know octet has got something to do with 7-bit stuff, and in ID3v2 tags are syncsave using 7-bit bytes.

View Replies !
FILES['file']['type']
im, currently working on a mutilmedia hosting script and we only allow certain file types jpg,gif,png for example what i want to know is should i rely on $_FILES['file']['type'] to determine the filetype or should i go with strripos() and rely on the file extension. i was concerned about going the file extension way simply because it doesnt take much to change a file extension.

View Replies !
Finding File Type
What is the best way to find out a file type of a certain file? I have a script I wrote that handles uploads, and I read somewhere (can't remember where) that relying on $_FILES['fileID']['type'] is not completely safe.

The files for the particular project I'm working on will just be images, jpegs to be exact, but I would like to write this in such a way that I can use it for other file types in the future (like zip files).

View Replies !
Identifying The Clicked Record
i already know how to load the my list of suppliers using
mysql/php/apache, but what i would like to do now is put a link for
each and every supplier and when someone clicks it, they will
automatically go to that supplier's list of products.

i want something like this:

SUPPLIERS TABLE
supplierID, Name, Address,

AA Alfin21 1506 w. 66th street <>EDIT<>

View Replies !
Identifying Search Engines
my website is pretty much database driven and i've typically parsed the data in PHP and just output flat HTML. however, i'm trying to save some badwidth by spitting out just the critical information, and have javascript parse out the data.

however, i'm kinda worried how search engines would react to this. (especially google) would search engines ignore the keywords if they are inside javascript tags? how do i detect search engines? maybe i can just setup a special script that output's "search-engine-friendly" output.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved