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




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 Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Type Image Submit Doesn't Work With IE
I made this really short.

Please try it with IE it will not work but it works fine with FireFox
Whats wrong here?

<?php
echo " Logout : " . $_POST['logout'] . "<br>";
echo " Login : " . $_POST['login'] . "<br>";
?>

How Do You Detect Image MIME Type Of An Image In A Directory?
How do you detect an image MIME type if you know of the image in a
directory? For example, I know of:

Code: ( php )

Content-type: Image/gif (or /jpg Or /png) Not Working.
I'm having a seriously difficult time trying to get to the bottom of why I can't serve an image that I have saved in a database. I'm using a regular HTML form to upload the image, then grabbing the data and saving it to db (BLOB type)... retrieval generally works like:

/*
get image data info, save to array $d
*/
Header("Content-Type: image/gif");
echo $d["image_content"]; // image data from db

This results in:
The image "<SCRIPT NAME>" cannot be displayed, because it contains errors.

This approach has worked many times for me in the past, but for some reason (on a new client's server) it's not working. Server is running Apache 1.3.34 and PHP 5.1.2.

Just a note, I am able to read the info from the db, save it to an external file with appropriate suffix (i.e., ".gif" for a Gif89a), and then point the browser to it and it displays fine.... it seems to me something is wrong with how the server is parsing or accepting the header, but I can't find any documentation on a possible fix.

Input Type=image Value Not Passed
I know this is really an HTML question, but a bunch of <i>designers</i> are not going to know the answer to this (yes, I know some programmers hang out there as well).

Anyway, does the input type 'image' not support a value??? I've got the typical form with two input types and the client wanted to change the buttons to images. No problem. But now my script doesn't work and I checked and the values assigned to the images are not being passed when the image is clicked. Is this normal or am I missing something?
AND, if it IS normal, how do I work around it???

Simple Image Type Array Problem
Rather simple problem but I can't seem to get it solved. The second index of GetImageSize() just gives me integers which represent filetypes (i.e. 1 => GIF, 2 => JPG, etc.). What I want to do is create an array or somehow when I print $imagehw[2], the second index which displays the integers, I want it to display the filenames as opposed to the integer. Below I tried creating an array but all the output I get is, "array".

BTW, $id is defined previously.

I've tried php.net but I don't really understand their explanations and furthermore, nothing there really addresses my problems. The search here for previous posts on this subject resulted nothing significant.

Code:
<?php
$imagehw = GetImageSize("images/$id");
$imagewidth = $imagehw[0];
$imageheight = $imagehw[1];
$imagetype = $imagehw[2];
$imagetype = array (".gif"=>"1",
".jpg"=>"2",
".jpeg"=>"2",
".png"=>"3",
".swf"=>"4",
".psd"=>"5",
".bmp"=>"6");

print "<b>Filename</b>: $id<br>";
print "<b>Image Filetype</b>: $imagetype<br>";
print "<b>Image Width</b>: $imagewidth<br>";
print "<b>Image Height</b>: $imageheight<br>";

?>

Image Upload - Verify File Type Help
Im having trouble getting this to work, i want to validate that the uploaded image ($picture) is a gif or jpeg.

[php]
// Validate the image type. Should be jpeg, jpg, or gif.
$allowed = array ('image/gif', 'image/jpeg', 'image/jpg');
if (in_array($_FILES['picture']['type'], $allowed))
{
$errors['picture2'] = 'Please ensure the image is a JPEG or GIF.'
}
[/php]

Image Upload Wrong File Type
I make an image, save it as a bmp. If I change the file  extention to a .jpg it changes.

My site allows for uploads of jpg, gif, and png. Since the above is actually a bmp, and some one tries to upload it with the jpg file extention, I get this error message:

Fatal error: Call to undefined function imagecreatefrombmp() in /home/.marble/ryannaddy/tzfiles.com/guestLoad.php(11) : eval()'d code on line 1

How can I stop that error from showing, and make my own error message saying somthing about it still being a bmp file, or exe, or html, etc. and only jpg, gif, and png are allowed? Code:

Format Of HTML GET And Input Type Image
I am trying to achieve something very simple (I think), but hitting hurdles with HTML code. My current code:

form  method = "GET" action="http://abc.test.com/register" >
<input type="image" name= "val"  value="foobar" src="elements/epayments.gif"
style="width:168px"  >
</form>

And the idea is that when I click the (image) button, I want it to invoke:

http://abc.test.com/register?val=foorbar.

Image Type And Size Filter For Upload
I have this code that works well for me.Just need the added function to check that "uploadFile" is a jpeg, jpg, gif or png and is no bigger than a meg. Code:

Imagejpeg Generating String Not Image Even With Header("Content-type:image/jpeg")
does anyone know why i can't generate images with:
header("Content-type:image/jpeg");
imagejpeg($img_number);

i've tried different examples but i always get a text output as if the
header doesn't make a difference at all.

<?php
//random_number.php
$img_number = imagecreate(100,50);
$white = imagecolorallocate($img_number,255,255,255);
$black = imagecolorallocate($img_number,0,0,0);
$grey_shade = imagecolorallocate($img_number,204,204,204);

imagefill($img_number,0,0,$grey_shade);
ImageRectangle($img_number,5,5,94,44,$black);
ImageRectangle($img_number,0,0,99,49,$black);

header("Content-type:image/jpeg");
imagejpeg($img_number);
?>

Upload Audio Files Of Type .wav & Video Files Of Type .avi
I need to upload audio files of type .wav & video files of type .avi
/ .mov but my current file unloader is not helping me with that. My
unloader works with application types, images, txt, pdf , mp3, mpg,
mpeg but not with those .wav & .mov/.avi files........

$_POST Behavior From Input=submit Vs Input-type=button
I have been trying to solve an annoying behavior with PHP (I think).
Maybe some of you have encountered the same and have some ideas.

I have an html form and I use an <input type="button"> element with
the onClick event that calls a javascript funtion. Once the script's
content has been processed, I execute the form.submit() directive.

I would like to combine the html form and the PHP script into one, and
use action="<?php echo($PHP_SELF) ?>".

When the html form has <input type="button" name="theButton"
value="thisisthetrigger" onclick="doThis(this.form)">but PHP cannot
'read' the value of $_POST["theButton"] after form.submit().

If I substitute the <input type="button"> for <input type="submit">
then PHP reads the value just fine. Some may argue to just use the
latter option, but that will cost me a trip back to the server to
basically do a lot of validation that can be very easily accomplished
on the client side.

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:

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.

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

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:

Losing $_POST Data With Input Type="image"
I am having problems with a php script that I am developing. I have a file called "login.php". It contains an HTML form with a username and password field, and is submitted with an image.

Here is a simplified version of my form:

<form name="form1" action="<?php echo $_SERVER['PHP_SELF']?>" method="post">
<input type="text" size="20" maxlength="50" class="text" name="uname">
<input type="password" size="20" maxlength="12" class="text" name="passwd">
<input type="image" src="images/b-login.jpg" border="0" name="submit">
</form>

As you can see, the script calls itself. However, when I try to access $_POST['uname'] and $_POST['password'], they do not exist.

If I replace the line

<input type="image" src="images/b-login.jpg" border="0" name="submit">

with

<input type="submit" name="submit" value="Login">

everything works fine. I need to use this image to submit my form, not the standard "Submit" button. Any ideas on what the problem is?

Input Type="image" $_POST Queries
I'm trying to set up a 'control panel' consisting of a table of icons.

The early stages: http://www.deepinit.com/controlcentre.php

Each of these is set up like:

<td>
<input type="image" id="addnews" src="/Image/add24.png"
name="addnews" value="addnews" width="24" height="24"><br />
<label for="addnews">Add News Item</label><br />
</td>

This is all taking place in a html form and I'm using input
type="image"... like 'submit' buttons.

Is this a 'good' approach?

I'm trying to handle the $_POST variable after a user clicks on one of
these but there are differences between firefox and ie6.

Using:
foreach ($_POST as $key=>$val) {
echo $key ."|". $val . "<br />";
}

ie6 is only listing
addnews_x|8
addnews_y|17

Firefox:
addnews_x|10
addnews_y|13
addnews|addnews

Why am I getting x and y co-ordinates?

Why in firefox do I get $val ('addnews|addnews') but not in ie6?

What I'm trying to do is redirect to other pages based on $_POST:

foreach ($_POST as $key=>$val) {
switch (strtolower($key)) {
case 'addnews_x':
PostHandler('addnews', 'news', '/posteditor.php');
break;
case 'editnews_x':
PostHandler('editnews', 'news', '/postsearch.php');
break;
case 'deletenews_x':
PostHandler('deletenews', 'news', '/postsearch.php');
break;
...

function PostHandler($command, $post_type, $redir_page) {
$_SESSION['ctlcentcmd'] = $command;
$_SESSION['posttype'] = $post_type;

ob_end_clean();
header('Location: http://' . $_SERVER['HTTP_HOST']
. $redir_page);
}

This is working but I'm not happy basing this on the x co-ordinate
(eg addnews_x). Surely there must be a better way?

If you wanted to implement a similar icon based 'Control Centre' what
approach would you take? The intent is to have a single page where the
site admin can add/edit/delete news, articles, bios, user data, etc

PHP Form Submission <input Type="hidden"> Security Issues?
Someone has said to me that when using a form (method = post), that storing data in "hidden" tags

ie <input type="hidden" name="myField" value="something">
means that the user can set the value to whatever they like

So my questions are:

1.  How would they do this
2.  How can I stop it
3.  Do I have to abandon the hidden values and go with sessions?

Passing Var With A Form "select" Type
i need to pass the choice of a form select to a page the form posts to "alllinks.php"

<form name="viewby" method="post" action="alllinks.php">

i want to send a value that i can pick up as $admin_userid on the next page, is this correct for sending it?

<option name="admin_userid">1</option>

bit confused, i've done this before with "text" types but a select seems to be more confusing?

Getting The MIME Type
I know this is easy if youve just uploaded a file using a form but suppose the file already exists on the server. Is there a function that can be called that takes the filename and returns image/gif or whatever.

Mysql Row Type?
what do I have to set a mysql row to, too be rank them in order when the numbers in the database are &#390;.00' format?

MIME-TYPE
I've written a file upload script and want to check the MIME-TYPE of the uploaded files. I've made use of the many posts and come up with the following:

// Check file type from MIME
$allowed_types = array("application/zip",
"application/x-zip",
"applicatoin/x-zip-compressed",
"multipart/x-zip",
"application/x-stuffit",
"application/x-stuffit-compressed",
"application/sit",
"application/x-sit",
"application/sea",
"application/x-sea",
"application/pdf");

if(in_array($file_type, $allowed_types)){
$error = 0;
} else {
$error = 1;
$error_msg .= "<li>The file type you are uploading is not allowed. Compress all files ".
"into ONE (1) archive with StuffIt or WinZip. As an alternative you may ".
"create a PDF file to upload. Consult your software documentation ".
"for more information.
MIME-TYPE not matched.</li>";}

I cannot seem to get a match from any file types in the allowed_types array.

Error Type In PHP
I'm using the errorHandler function
(http://www.zend.com/zend/spotlight/error.php) to manage error handling in
my code, the problem is that in all the tests that I did the error type is
always E_WARNING, I've tested the div by 0, database error,....
how can I have an E_ERROR, because I need that the execution stops in teh
case of E_ERROR errors.

Column Type
when u r using combination of php and mysql to make a discussion board like this one is, then what column type do u use for storing all the posts into mysql database. Is it large text or something like that? I don't have experience with those columns too much.

Variables Type
Is it possible to type variable in PHP inspite this is a loose type
language. Or would that be required in some cases?

Get Type Of Index
is there a way (function) whereby I could get hold of a particular table index type? It's funny because when I use Show fields to get records of my tables, I can get PRI (Primary Key), UNI (Unique) but after the first two field, other index I get is stated as MUL. What's wrong with that? I'm not sure what's MUL maybe it stands for Multiples? But that's one field only consist of unique index but it show MUL. How can anyone explain?

New Type Of CAPTCHA
It's a different approach against stopping bots... I would like to hear your thoughts on this.

1. make a form with all your fields.

2. add an extra text field, this field will be the same color as you background, along with borders and the whole nine yards.

3. When a person views the page, he/she will not see the text field so they won't fill it in, but on the other hand a robot will see the field and fill it out.

4. When doing a data check instead of checking your image, you would check to see if the field is filled in or not.

5. If it is filled in then it probably is a robot, if not then it probably is a living breathing person.

So what do you think?  I heard that this is common among larger web companies.

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

Type Casting
I've got a problem with type casting in php. I've got the the following code ( it's a test so it doesn't do very mutch)

<?php
class test{
  function  Casted(string $mysting,int $myint){
  
         echo 'your string is '. $mysting;
         echo 'your integer is '.$myint; }}

$myfunction = new test;
$myfunction.Casted('hello world',1234567);?>

The above code generates an error on the line where I try to call the function by saying that the 1st variable does not have the right type... :S does anyone know how ( or if it possible at all) to do the above?

Nameserver Type
Usually I'm used to putting in my 2 nameservers, like, ns1.hostname.com and ns2.hostname.com but on this it has different types, so no idea which type it is I have to select.

They are:
A
CNAME
HINFO
PTR
TXT
WKS
ISDN
RP

Does anyone understand this?

Obtaining O.S Type
Is there a way to obtain what operating system a user is using when they register to my site without them giving the info which would mean they could lie. Similar to how you get their ip but with operating systems?

The reason why is cos multiple accounts i want to allow as long as the two accounts are not on the same OS which adds extra proof they they may be "brothers and sisters" etc with two computers.

If they cheat for example and say "hes my brother he is on a different pc in a different room.." i want to find a way to get enough info to prove it.. cos my fear is banning people who ain't lying.. cos there are bound to be instances... i just want to keep it as fair as possible.

Set Content Type
my website is xhtml 1.1 compliant just needs to have the header changed to application/xhtml+xml and encoding utf-8

the problem occurs when i have:
header("Vary: Accept");
if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml"))
    header("Content-Type: application/xhtml+xml; charset=utf-8");
else
    header("Content-Type: text/html; charset=utf-8");
the page messes up. Code:

Calendar Type
Have worked briefly with PHP, though as I used to install cracks to forums (I have an extensive knowledge of scripting language and can generally pick up coding languages quite quickly)

I'm looking to find a freeware calendar database (or help with how to set up my own using cPanel / Fantastico and PHP).

I work in a venue and would be looking to export the months event information in tabular form, but also to have a DIV layer display that day's event.  Any idea what would be the best way to go about this?

Content-type Question
Hi, i looking to integrate a stream to allow force downloads of HTML,PHP and TXT files.

Is There A Universal Field Type?
Is there a field that will accept any type of data? like varchar, blob, or any special combination, that will hold the data I insert into a table... exactly as it was entered (including quotes ' and "). .. and not let mysql parse through it?

Mime Type Question
I have built a form that uploads a file into a directory. Everything works great when i dont validate the form but I have to validate the file type.

The only mime type that i could find for an .xlt file is application/vnd.ms-excel only problem is that i can only upload a .xls file with that mime type. does anybody have any ideas on this? PHP Code:

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

Mutly Type Email
I have setup an email response to a mailinglist subscription on a site, that return Email goes as "Content-Type: text/html; charset=iso-8859-1", However, I suspect there are still a lot of poeple out there not using HTML enabled email clients / systems.

So, I gather I need to send out 2 specific scripts ? (1 HTML / 1 Plain text). can someone please point me in the right direction?

Php And Mssql 's Date Type
I fetch a row from an MSSQL db with a field that's of type date. I'm returned i.e. Oct 15 2003 12:00AM.

$test = mssql_fetch_row($resultmail);
echo $test[0];

I want only to get the date returned and not the time i.e. Oct 15 2003. Any clever way of doing that?

Youtube Type System
do you have any idea , if someone wants to make a site like youtube. what he has to do , and what kind of scripts has to be developed.

PHP 4.3.0 Gd Bundle With Free Type 2.5.1
I'm attempting to use true type fonts via free type, but it isn't currently working with the gd 2.0 bundle that comes in the php4.3 package.

phpinfo shows that gd is enabled, and the version is bundled 2.0 compatible. Also, it shows FreeType Support enabled and FreeType Linkage as with freetype.

Problem is, using imagettfbbox with a valid font, font size, and string returns empty coordinates (a size of -1,-1,-1,-1,-1,-1).

Has anyone successfully used true type fonts with the php gd bundle?

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!

Variable Type Const
Is it possible to make a variable type const, like in C++ so you cant change it's value later, also if yes, what happens when you try to change the value, will the script still execute?


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:

Php, GD Library, Content-type
I've managed to get as far as using some of the GD2 drawing functions
included in the php_gd2.dll. I can't figure out how to put HTML and
PHP output on the same browser page, no doubt this has something to
do with the header;

<?php
header ("Content-type: image/png");
$t = imagecreate(400,150);// create a blank canvas
$c = imagecolorallocate($t,0,255,0);// set color for the first
thing
imagefilledrectangle($t,10,10,50,50,$c);// draw a rectange
$c = imagecolorallocate($t,215,20,20);// set color for the next
imagefilledellipse($t,50,50,75,75,$c);// draw an ellipse
$w = "it's not easy to learn this stuff!";
$c = imagecolorallocate($t,50,50,150);
imagestring($t,4,100,70,$w,$c);
imagepng($t);// output the image
imagedestroy($t);// clear memory, but not the browser
/* NOTHING FOLLOWING OUTPUTS */
echo "<pre>";
var_dump(gd_info());
echo "</pre>";
?>

A Type Is Which Named Resource What Is This.
please explain a php (in 5.2.xx manuel) variable type which is named
RESOURCE. if send me good code example I will thank you. the
informations about RESOURCE which are in manual I coud not exactly
understand.

Variable Type Detection?
Is there a way for PHP to tell where a variable came from? Like for example if it was in something like: index.php?getpage=moo

of if it was set inside the php it self or in from form data or whatever. Basically the idea is to keep the user from screwing around when I don't want them to.

Trouble With SoapVar Or Is It Xsi:Type?
I'm pretty sure what I'm up against now is a namespace issue and/or a
misunderstanding of how to use SoapVar.

From the NetSuite docs, the request should look something like:

<soapenv:Body>
<search xmlns="urn:messages_2_5.platform.webservices.netsuite.com ">
<searchRecord xsi:type="ns1:ContactSearch"
xmlns:ns1="urn:relationships_2_5.lists.webservices.netsuite.c om">
<ns1:customerJoin xsi:type="ns2:CustomerSearchBasic"
xmlns:ns2="urn:common_2_5.platform.webservices.netsuite.com">
<ns2:internalId operator="anyOf"
xsi:type="ns3:SearchMultiSelectField"
xmlns:ns3="urn:core_2_5.platform.webservices.netsuite.com">
<ns3:searchValue internalId="1" type="customer"
xsi:type="ns3:RecordRef"/ >
</ns2:internalId>
</ns1:customerJoin>
</searchRecord>
</search>
</soapenv:Body>

But using SoapVar and SoapClient, what I'm actually requesting looks
like:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/
envelope/"
xmlns:ns1="urn:messages_2_5.platform.webservices.netsuite.com ">
<SOAP-ENV:Body>
<ns1:search>
<customerJoin>
<internalId>
<operator>anyOf</operator>
<searchValue>1</searchValue>
</internalId>
</customerJoin>
</ns1:search>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The code to do so looks something along the lines of:

$ssr = new SOAPContactSearch();
$ssr->customerJoin = new SOAPCustomerSearchBasic(); $ssr->customerJoin-

Quote:


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