php-windows Digest 19 Nov 2002 02:27:17 -0000 Issue 1447
Topics (messages 17000 through 17019):
Re: String as submit
17000 by: Steel
17004 by: suhailkaleem
Re: Subject: String as submit
17001 by: Neil Smith
Re: Preconfigure Php+MySql+Apache bundle for Win9x
17002 by: Richard Allsebrook
Variable problem
17003 by: suhailkaleem
17014 by: Stephen Edmonds
IIS / COM yet another one.
17005 by: Ryan Marrs
How to receive ServerRoot in variables PHP
17006 by: Franco Pozzer
data entry form - php or something more robust?
17007 by: Marlene Burckhalter
17008 by: Luis Ferro
17012 by: Franco Pozzer
lost tryin to UPLOAD a file .... :(
17009 by: toby z
Re: problem insert data into mysql
17010 by: toby z
php 4.2.3, gd2, freetype 2 and still a problem with truetype fonts
17011 by: Claudia Raedig
17015 by: Stephen Edmonds
17017 by: Claudia Raedig
Re: looping the query_string into a $var=$value
17013 by: Brian 'Bex' Huff
file_exists()
17016 by: DaMouse
17018 by: Dash McElroy
parse error
17019 by: zeus
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
hi Rodrigo,
Monday, November 18, 2002, 8:19:05 PM, I've got:
RSM> hi.
RSM> I want to use a sting as a submit button. Can I do that, and how?
For example:
echo "<input type='submit' name='submit' value='$string'>";
--
The Same,
Steel mailto:[EMAIL PROTECTED]
http://www.none.ru
--- End Message ---
--- Begin Message ---
"Steel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi Rodrigo,
>
> Monday, November 18, 2002, 8:19:05 PM, I've got:
>
> RSM> hi.
>
> RSM> I want to use a sting as a submit button. Can I do that, and how?
>
> For example:
>
> echo "<input type='submit' name='submit' value='$string'>";
>
> --
> The Same,
> Steel mailto:[EMAIL PROTECTED]
> http://www.none.ru
>
--- End Message ---
--- Begin Message ---
Hello -
When you mean 'string as submit' do you refer to using a link ... <a
href=....> ?
Either use a form element called "image"
<input type="image" name="submit" value="submit" src="image_source_url">
or use javascript to send the form
<a href="#" onClick="document.forms.formname.submit()">Submit form</a>
Where formname is what you put in the name / ID of your <form> element.
This is all really basic HTML though - why are you posting it to a PHP
newsgroup???
Regards,
Neil Smith.
At 08:17 18/11/2002 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "Rodrigo San Martin" <[EMAIL PROTECTED]>
Date: Mon, 18 Nov 2002 09:19:05 -0800
Subject: String as submit
hi.
I want to use a sting as a submit button. Can I do that, and how?
------------------------------------------
Rodrigo San Martin
Institutt for datateknologi og informatikk
http://www.idi.ntnu.no/~rodrigo
--- End Message ---
--- Begin Message ---
I have no complaints using the nusphere technology platform distribution
Get it from -> http://nusphere.com under their free downloads section
"Muhammad Imran" <[EMAIL PROTECTED]> wrote in message
001201c28ae6$1ac626a0$[EMAIL PROTECTED]">news:001201c28ae6$1ac626a0$[EMAIL PROTECTED]...
Can any one tell me that from where I can get the reconfigured
Php+MySql+Apache bundle for Win9x.
Thank you,
Imran
--- End Message ---
--- Begin Message ---
hi !
yes you were right there is space between server name but still i am unable
to remove it
$username ,$password,$server are comming from file and they have correct
values
$username1 = $username;
$password1 = $password;
$server1 = $server;
echo $server."test<BR>" ;
echo $password."test<BR>" ;
echo $username."test<BR>" ;
/*
This echo
127.0.0.1 test
excel test
suhailkaleem test
it echo with a space between variable value and the string test .there
is space in text file at the end of these values ?
*/
$username = "suhailkaleem";
$password = "excel";
$server = "127.0.0.1";
echo $server."test" ;
// This echo 127.0.0.1test no space
/*
why is that i see space between server and string when the values come from
the text file , although there is no space in text file at the end of
server name but when i use in my script the space appears?????
*/
--- End Message ---
--- Begin Message ---
If you need to remove the space, use trim( $variable ). Trim() removes all
white space/tabs etc from the end and start of a string.
$Variable = " LOTS of white Space :-( ";
trim( $Variable );
echo "*".$Variable."*";
displays
*LOTS of white Space :-(*
instead of
* LOTS of white Space :-( *
which would occur without the use of trim
chop() does the same but ONLY at the end of a string. (IE: Space at the
start is kept)
$Variable = " LOTS of white Space :-( ";
chop( $Variable );
echo "*".$Variable."*";
displays
* LOTS of white Space :-(*
ltrim() does the same but ONLY at the start of a string (IE: Space at the
end is kept)
$Variable = " LOTS of white Space :-( ";
ltrim( $Variable );
echo "*".$Variable."*";
displays
*LOTS of white Space :-( *
Hope this helps
Stephen
----- Original Message -----
From: "suhailkaleem" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 18, 2002 1:05 PM
Subject: [PHP-WIN] Variable problem
> hi !
>
> yes you were right there is space between server name but still i am
unable
> to remove it
>
>
> $username ,$password,$server are comming from file and they have correct
> values
>
> $username1 = $username;
> $password1 = $password;
> $server1 = $server;
> echo $server."test<BR>" ;
> echo $password."test<BR>" ;
> echo $username."test<BR>" ;
>
> /*
> This echo
> 127.0.0.1 test
> excel test
> suhailkaleem test
>
> it echo with a space between variable value and the string test .there
> is space in text file at the end of these values ?
>
>
> */
>
>
>
> $username = "suhailkaleem";
> $password = "excel";
> $server = "127.0.0.1";
> echo $server."test" ;
> // This echo 127.0.0.1test no space
>
>
>
>
> /*
> why is that i see space between server and string when the values come
from
> the text file , although there is no space in text file at the end of
> server name but when i use in my script the space appears?????
> */
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I have the following code for managing validation of data on a SQL server.
I was just using the NEW COM code, but after exhausting everything else, I
gave it a go with the com_load and com_invoke.
System Specs:
Windows XP Professional
IIS 5.0 / PHP 4.2.3
$_GET["DocumentID"] = 115739;
Pursue_Utility_DLL.dll is located in d:\inetpub\wwwroot\PursueWEB\
clsPursueUtility is the name of the class. ValidateDocumentData is the name
of the sub.
All permissions granted were to everyone.
<?
$Conn = com_load("Pursue_Utility_DLL.clsPursueUtility") or
die("That didn't work.");
$Result=$Conn->com_invoke(ValidateDocumentData($_GET["DocumentID"]));
?>
We've all heard the Access denied problems and having to use DCOMCNFG, well,
that was done, and after I granted it access, I now receive this:
[18-Nov-2002 09:19:51] PHP Warning: Unable to obtain IDispatch interface
for CLSID {9C7CF062-207D-4D74-8410-2A3C752FB489}: No description available
in d:\inetpub\wwwroot\PursueWEB\editdocumentco.php on line 38
The file was registered...
Any ideas?
Thanks!
--- End Message ---
--- Begin Message ---
Tanks for all for the response.
I have see with phpinfo.php any variables of the Apache+PHP configuration.
I do not have see a variable PHP with value of the ServerRoot of the Apache.
My installation are in WinNT system like C:\OPENFEDRA\Apache\.......... and
C:\OPENFEDRA\PHP\.........
My ServerRoot definited into httpd.conf are "C:/OPENFEDRA/Apache".
thanks for all for any response.
Ciao Franco
--- End Message ---
--- Begin Message ---
hello
I'm new at php (XP, PHP, MYSQL, APACHE).
My dilema is whether php is robust enough to insert data collected from a
html form into a mysql database, and then display the same html form to the user
again and again for continous entry of records.
Another twist is that some of the data should only have to be entered
once by the user, but still be inserted into the database for each record that
is posted.
Has anyone done this with php? Or do I need to find a
programmer?
Marlene
|
--- End Message ---
--- Begin Message ---
Marlene Burckhalter wrote:
hello
I'm new at php (XP, PHP, MYSQL, APACHE).
My dilema is whether php is robust enough to insert data collected
from a html form into a mysql database, and then display the same html
form to the user again and again for continous entry of records.
Another twist is that some of the data should only have to be entered
once by the user, but still be inserted into the database for each
record that is posted.
Has anyone done this with php? Or do I need to find a programmer?
This is doable in PHP, and yes, you will end up needing the help of a
programmer...
Marlene
Cheers...
Luis Ferro
---
[This E-mail scanned for viruses by Declude Virus]
--- End Message ---
--- Begin Message ---
Marlene, I hope to write clear things in order to help you.
I and my team have made one applicatione of date entry with Apache and PHP
using rows XML
in order to record the infomazioni or for having the coordinates in order
to construct the form dynamically.
The thing that has complicated us the life in developing the application has
been the controls on the fields.
PHP works on the serve (server site) and therefore the controls on the
single fields before the post cannot be made on the client.
Moreover could not be made of the post of form because the thing would be
with little entusiasmanti performances and also from a little
useful ergonomic point of view for the final utilizzatore.
Moral of the history we have been unfortunately forced to integrate much
code PHP with Javascript in order to execute controls side client
before the post of the form.
This not it is a PHP limit. Perhaps our application did not have to be made
with Apache and PHP but with other technologies where lagestione
of the events turns out better.
They are not sure that these centers with what you have in mind to make; I
want to only suggest that if before making a post and you must
make of the controls and to manage events with PHP this could be little
complicated.
Ciao Franco.
Luis Ferro wrote:
> Marlene Burckhalter wrote:
>
> > hello
> > I'm new at php (XP, PHP, MYSQL, APACHE).
> > My dilema is whether php is robust enough to insert data collected
> > from a html form into a mysql database, and then display the same html
> > form to the user again and again for continous entry of records.
> > Another twist is that some of the data should only have to be entered
> > once by the user, but still be inserted into the database for each
> > record that is posted.
> > Has anyone done this with php? Or do I need to find a programmer?
>
> This is doable in PHP, and yes, you will end up needing the help of a
> programmer...
>
> > Marlene
>
> Cheers...
> Luis Ferro
>
> ---
> [This E-mail scanned for viruses by Declude Virus]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
hay guyz .....
im tryin to upload a file to my server n im gettin
this on the screen :
file submittedmissing in beta ! ! ! !.txtfile sixe
162file typetext/plain
Warning: Unable to open '' for reading: Permission
denied in e:\final project\zroot\up.php on line 89
Either you did not upload any file, or you uploaded an
empty file! (Y) :P:P:P
toby z
here s the code
lou.php
---------
echo("<form enctype=\"multipart/form-data\"
action=up.php method=post>");
include"writer_info_dsply.php";
include "lang_dsply.php";
include "cat_dsply.php";
// <!-- entr title -->
echo("<tr> <td> title </td>");
echo (" <td> <INPUT NAME=title TYPE=text
style=\"font-family: '$font'\"> </INPUT> </td> </tr>
");
// <!-- summary -->
echo("<tr> <td valign='top'>summary </td>");
echo(" <td> <textarea name=summary rows=7 cols=60
wrap=virtual style=\"font-family: '$font'\">
</textarea> </td> </tr> ");
echo("<tr> <td valign='top'><input type=hidden
name=MAX_FILE_SIZE value=2000000>
Send this file: <input name=userfile type=file> </td>
<td> (file size should not exceed 2mb)</td> </tr>
<tr><td> <input type=submit value='Send File'
style=\"font-family: Riwaj\">
</td></tr>");
-------------------------------------------------------
up.php
--------
// followin waz tried outta sheer despiration
$file_origin = $_POST['file_origin'];
$destination_directory=$_POST['destination_directory'];
$file_destination = $_POST['$file_destination'];
$overwrite = $_POST['$overwrite'];
$fatal = $_POST['$fatal'];
$fp = $_POST['$fp'];
$error_prefix = $_POST['$error_prefix'];
$copy_file = $_POST['$copy_file'];
$copy_file = $_POST['$copy_file'];
$dest_file_exists = $_POST['$dest_file_exists'];
// endda despration 1
include "cpychk.php";
include"cnctdb.php";
include"styl.php";
/* i cut it out ven i found i had been a goof again
.... :(
$userfile_name=$_POST['userfile_name'];
$userfile_size=$_POST['userfile_size'];
$userfile_type=$_POST['userfile_type'];
*/
$userfile_name=$_FILES['userfile']['name'];
$userfile_type=$_FILES['userfile']['type'];
$userfile_size=$_FILES['userfile']['size'];
$cat_opt_name =$_POST['cat_opt_name'];
$lang_opt_name=$_POST['lang_opt_name'];
$firstName=$_POST['firstName'];
$lastName=$_POST['lastName'];
$title=$_POST['title'];
$summary=$_POST['summary'];
echo("file submitted" .$userfile_name );
echo("file sixe " .$userfile_size);
echo("file type" .$userfile_type);
$unique_id = time();
$name = "$unique_id.$userfile_name"; // fo t imestmp
++ usr givn name !!!!!
$zname = 'moronhead'; // sorry bout dis try ....
//if (copy($userfile, "E:/final project/zroot/tmp
uploadz/" . $unique_id."-". $userfile_name )) // dis
didnt work
if (copy($_FILE['userfile']['name'], "E:/final
project/zroot/tmp uploadz\\" . $unique_id)) // so i
tried dis .... :S
{
echo("<b> file successfully uploaded </b>");
// insrtn in2 db !!!!
$query = "SELECT memb_id FROM lgn where login =
'$login' ";
$query_result_handle = mysql_query ($query)
or die ('qry failed ! DA tbl must xixt in DA db
specifyd bov ....');
$memb_id=mysql_fetch_row($query_result_handle);
$sql = "insert into ctnt_inf (cat_id, lang_id,
memb_id, firstName, lastName, title, summary,
path_of_upload, isfile, type,sixe, date_time, day,
month, year ) " .
"values (" . $cat_opt_name . "," . $lang_opt_name .
", " . $memb_id[0] . ",'" . $firstName . "', '" .
$lastName . "','" . $title . "','" . $summary . "','"
. $unique_id. "', '1' ,'" . $userfile_type . "','" .
$userfile_size . "'," . time() . ", " . date("d"). ",
" . date("m"). ", " . date("Y").") ";
if ( mysql_query($sql) )
{ echo("<font face='riwaj'><P>article submitted !
! ! !</P>"
. $title."<br>"//. $body .
. "<br>".$summary.
"</font>" );
}
else
{ echo("<P>Error uploadin file : " .
mysql_error() . "</P>");
}
}
else //(!$userfile_size)
echo( "Either you did not upload any file, or you
uploaded an empty file! ");
echo( "(Y)" .
" " . ":P:P:P"."<br><br>".
$login . "<br>" ) ;
echo($firstName ." ". $lastName);
echo($query);
echo($sql);
-------------------------------------------------------
included file cpychk.php
-------------------------
//function that performs various checks before
copying:
function file_copy($file_origin,
$destination_directory,
$file_destination, $overwrite, $fatal) {
if ($fatal) {
$error_prefix = 'FATAL: File copy of \'' .
$file_origin . '\' to \'' .
$destination_directory . $file_destination . '\'
failed.';
$fp = @fopen($file_origin, "r");
if (!$fp) {
echo $error_prefix . ' Originating file cannot be
read or does not exist.';
exit();
}
$dir_check = @is_writeable($destination_directory);
if (!$dir_check) {
echo $error_prefix . ' Destination directory is not
writeable or does not exist.';
exit();
}
$dest_file_exists =
file_exists($destination_directory .
$file_destination);
if ($dest_file_exists) {
if ($overwrite) {
$fp = @is_writeable($destination_directory .
$file_destination);
if (!$fp) {
echo $error_prefix . ' Destination file is not
writeable [OVERWRITE].';
exit();
}
$copy_file = @copy($file_origin,
$destination_directory . $file_destination);
}
} else {
$copy_file = @copy($file_origin,
$destination_directory . $file_destination);
}
} else {
$copy_file = @copy($file_origin,
$destination_directory . $file_destination);
}
}
-----------------------------------------------------
ok now
1 . i came across this cpychk thinggy couple of months
bak n im sorry i cant remember vere i found it ....
:$:$:$
2. i cant even get to display my qureyes on the up.php
screen .....
3. its pickin up the file name, type n size all fine
but y the hell cant it open the file fo readin ????? i
fail to under stand
4. the phpinfo.php at my web host says :
upload_tmp_dir (local)no value (master)no value
what shall i do with that ?????
5. im sure ive must ve made an idiot outta myslf
asusual but plz pardon me fo it all n
sos plz .......
thnx a billion guys fo lumpin me .....
clueless as usual .....
toby ......
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
hay zues
try this
insert into table values (" . $first. ",
" . $last. " );
hope this works .....
good luck
toby ......
--- zeus <[EMAIL PROTECTED]> wrote: > I make
register golbals on, but it doesn't solve the
> problems. The wird
> thing is, i am using php nuke in my localhost, it
> can enter datas into
> MySQL, the form and the script it's not diffrent
> than mine right
> (phpnuke more complex). The form it self don't have
> any errors?? and how
> about the PHP script?? is there any error?
>
> I need explanation in english please..please..
> because i am still new in
> php.
>
>
>
> Dash McElroy wrote:
>
> >Oh - you might want to check your register_globals
> item in php.ini and set
> >it to on (look at www.php.net/register_globals) or
> use $_GET['varname'] for
> >GET, $_POST['varname'] for POST, or
> $_REQUEST['varname'] for Get/Post/Cookie
> >(works for any of those).
> >
> >-Dash
> >
> >-----Original Message-----
> >From: zeus [mailto:[EMAIL PROTECTED]]
> >Sent: Saturday, November 16, 2002 8:49 AM
> >To: phpwin
> >Subject: [PHP-WIN] problem insert data into mysql
> >
> >
> >I make this script. I have a problem, the data
> entered in the form wont
> >insert into MYSQL, the database added new row but
> with blank database.
> >Is there something wrong with the script? because i
> install phpnuke and
> >i can added new data into mysql.
> >Thanks, i need solve this problem A.S.A.P, with
> your kind help o PHP-er....
> >
> >Thanks..
> >
> >using
> >PHP 4.2
> >Apache 1.3
> >========================code===================
> ><form action="insert.php" method="post">
> >First Name: <input type="text" name="first"><br>
> >Last Name: <input type="text" name="last"><br>
> >Phone: <input type="text" name="phone"><br>
> >Mobile: <input type="text" name="mobile"><br>
> >Fax: <input type="text" name="fax"><br>
> >E-mail: <input type="text" name="email"><br>
> >Web: <input type="text" name="web"><br>
> ><input type="Submit">
> ></form>
> ><?PHP
> >$username="root";
> >$password="";
> >$database="belajarPHP";
> >mysql_connect(localhost,$username,$password);
> >@mysql_select_db($database) or die( "Unable to
> select database");
> >$query = "INSERT INTO contacts VALUES
>
>('','$first','$last','$phone','$mobile','$fax','$email','$web')";
> >mysql_query($query);
> >mysql_close();
> >
> >
> >?>
> >
> >
> >
> >
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
hello everybody,
I am working with php 4.2.3, apache/1.3.26, on windows 2000 and thought
that I finally managed to successfully install gd2.
but of course I was wrong, it is only working as long as I don't use
truetype-functions.
still my phpinfo() tells me that FreeType Support is enabled, as well
as FreeType Linkage with freetype .
I have checked already many archives, but only found solutions for this
problems for older php- or freetype-versions.
those didn't work with my configuration.
has anybody a solution to my problem? please!!!!!!!
(the error message is: "Could not find/open font in c:\...", and it is
not a problem of wrong path, I tried everything)
thank you very much in advance,
ciao, claudia
--- End Message ---
--- Begin Message ---
I have the same problem with GD2. In the end I gave up and went back to
1.3.somin (It comes with the php distibution). The older version works, but
does uses a slightly different syntax and has not got the most advanced
features of GD2 (Such as drawing a filled arc!)
----- Original Message -----
From: "Claudia Raedig" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 18, 2002 3:17 PM
Subject: [PHP-WIN] php 4.2.3, gd2, freetype 2 and still a problem with
truetype fonts
> hello everybody,
> I am working with php 4.2.3, apache/1.3.26, on windows 2000 and thought
> that I finally managed to successfully install gd2.
> but of course I was wrong, it is only working as long as I don't use
> truetype-functions.
> still my phpinfo() tells me that FreeType Support is enabled, as well
> as FreeType Linkage with freetype .
> I have checked already many archives, but only found solutions for this
> problems for older php- or freetype-versions.
> those didn't work with my configuration.
> has anybody a solution to my problem? please!!!!!!!
> (the error message is: "Could not find/open font in c:\...", and it is
> not a problem of wrong path, I tried everything)
> thank you very much in advance,
> ciao, claudia
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
hello everybody again,
a solution for this problem is offered on http://bugs.php.net, #bug 18879. I didn't find it earlier, but the workaround:
putenv("GDFONTPATH=c:\\winnt\\fonts");
then use font name without extension (eg. "arial") in your call to ImageTTFBBox();
works perfectly, with other ttf-functions as well.
ciao, claudia
--- End Message ---
--- Begin Message ---
Interesting... You should check out the 'eval' function:
http://www.php.net/manual/en/function.eval.php
This can be used to evaluate a string as if its PHP code. Its tricky to
use, so you will probably have to do a bit of trial and error, but the
required code would look something like this:
// you want something like this: $foo = "bar";
$php_to_eval = "\$" . addslashes($key) .
" = \"" . addslashes($value) "\";";
eval($php_to_eval);
You'll need to be VERY careful with $key and $value... make sure it
doesn't contain any quotes by using addslashes()... otherwise you just
opened up a hacker hole.
Read the comments to the documentation at the bottom of the URL above.
There's lots of people giving useful tips and tricks...
--
Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424
I was wondering how I can loop over the QUERY_STRING server variable to
make all the get variables into a localized variables. I know it has
something to do with setting the variable using a double $$? is that
correct?
/*localize url vars */
$urlQuery_string = explode("&", $_SERVER['QUERY_STRING']);
for ($i=0; $i < count($urlQuery_string); $i++) {
$keyvalue = explode("=", $urlQuery_String[$i]);
/* ok now what? */
}
--- End Message ---
--- Begin Message ---
is there a way to find if a file exists on a remote
server?
![O]() Ensign Baker HCO
Officer USS Atlantis
|
--- End Message ---
--- Begin Message ---
DaMouse:
Try looking at www.php.net/fopen : the 3rd comment should work:
To check if a file exists using http or ftp use the following:
$fp = @fopen("http://www.someurl.com/testfile.php3","r");
if ($fp)
{ print"The file exists!"; }
else
{ print"The file does not exist"; }
Note: The "@" in front of fopen suppresses the error output of the
function.
I hope this clears up some confusion.
-Dash
-----Original Message-----
From: DaMouse [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 17, 2002 1:36 PM
To: PHP - Win
Subject: [PHP-WIN] file_exists()
is there a way to find if a file exists on a remote server?
Ensign Baker
HCO Officer
USS Atlantis
--- End Message ---
--- Begin Message ---
i get parse error with this code, what's wrong with the code? i think i
have give the "else" statement in ther right way.
help,neet it so bad.....
Thanks....
===========================================
<form action="<? echo $PHP_SELF ?>" method="post">
<?PHP
/////////////////////
//configure ///
/////////////////////
require("config.php");
/////////////////////
//connect ke mysql///
/////////////////////
mysql_connect($db_host,$db_user,$db_pass) or die ("cannot connect");
@mysql_select_db($db_base) or die ("cannot select db");
if($submit)//kalo tombol submit belum di tekan
{
$result=mysql_query("SELECT * from balon_chara");
while($r=mysql_fetch_array($result))//loop
{
$chara_id=$r["chara_id"];
$judul=$r["judul"];
?>
<input type="radio" name="chara_id" value="<? echo $id; ?>">
<? echo $id; ?>
<? echo $judul; ?><br>
<?}?>
<input type="submit" name="submit" value="submit"></form>
<?}?>
<?
else($submit)
{
$sql = "DELETE FROM balon_chara WHERE chara_id='$chara_id'";
$result = mysql_query($sql);
echo "recold deleted";
}
?>
--- End Message ---