php-windows Digest 6 Jun 2002 21:50:58 -0000 Issue 1179
Topics (messages 14103 through 14110):
Re: newbie problem with quotes
14103 by: Ilker Cetinkaya
Re: [PHP] PHP version 4.2 and above
14104 by: Michael Davey
Detecting Usernames
14105 by: Carl Whittaker
14109 by: Shrock, Court
Re: Form Problem
14106 by: Ilker Cetinkaya
14108 by: brother
Re: CSV. Parsing a defined row?
14107 by: Ilker Cetinkaya
php for windows book
14110 by: Andrew Stopford
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 ---
"Steve Yates" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> "Prachi Shroff" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > the link just says
> > javascript:window.open(
> > Why would that happen?
>
> > R'twick Niceorgaw <[EMAIL PROTECTED]> wrote: echo "
>
href=\"javascript:window.open(\"addfossilpage.php?me=$folder_id\",\"width=43
> > 0\",\"height=450\" )\">";
>
> Count your quotes...your string is
>
> href="javascript:window.open("
>
> At that second quote your string ends. Use single quotes inside the
> doubles, or single quote the entire string and get rid of the slashes.
> Something like:
>
> echo 'href="javascript:window.open("addfossilpage.php?me=' . $folder_id .
> '","width=43 0","height=450" )">';
>
prachi, you quote count is correct.
you have to realize here that not only php is expecting correct quoting,
html and javascript also do.
your fault is trying this with plain html
<a href="javascript.window.open("addfossilpage.php?me=1")">
which is not correct because of inline quotes in the href attribute.
the right version is
<a href="javascript.window.open('addfossilpage.php?me=1')">
in consequence, php echoing would be most effective like this
echo "<a
href=\"javascript:window.open('addfossilpage.php?me=$folder_id','width=430',
'height=450')\">";
note that $folder_id is stated within the string itself, this works because
you started the php string with double-quotes.
hth
ilker
--- End Message ---
--- Begin Message ---
If you downloasd the zip rather than the installer, you get all of the
extensions bundled with it - as you have already installed PHP, you just
have to put the extensions in the correct directory...
Mikey
"James Opere" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm working on a windows2000 platform and i need to use php version >=4.2
> for my graphics.How do i go about solving the problem of gd that can be
> supported by the above php version? The gd in phpdev 4(php version 4.06)
> cannot be supported by the bove php version.
>
> -----Original Message-----
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 10:20 AM
> To: Opere, James
> Cc: PHP Windows Discussion List; PHP General Discussion List
> Subject: Re: [PHP] PHP version 4.2 and above
>
>
> On Wed, 22 May 2002, Opere, James wrote:
> > I have aproblem with php >= 4.2.I'm working on graphics but when i
install
> > php4.2, i get an error that it doesn't support GD library.
> > Is there anybody who has any idea as to how it can be possible to use
the
> > above versions and still run my scripts successfully?
> >
> > Currently i'm using phpdev4 which with php 4.06 which does not support
> > global variables but support the GD library for Graphics.
>
> Any version supports the GD library if you install it that way. But
> without knowing your platform it's hard to guess what you might have to do
> in order to get things going.
>
> miguel
--- End Message ---
--- Begin Message ---
I was just wondering if anyone knows of a way to detect a clients username
in php, im building a system for reporting equipment faults to an ict
support team. It will be used on a Win2K server over the local intranet and
id like to be able to pick this up to save time and also prevent people from
filing phony reports.
Thanks alot!
Carl
--- End Message ---
--- Begin Message ---
You could configure IIS to require authentication before giving them access
to the form, thereby allowing you access to their username. It really
doesn't take that long to type your username/password.
-----Original Message-----
From: Carl Whittaker
To: [EMAIL PROTECTED]
Sent: 6/6/02 7:47 AM
Subject: [PHP-WIN] Detecting Usernames
I was just wondering if anyone knows of a way to detect a clients
username
in php, im building a system for reporting equipment faults to an ict
support team. It will be used on a Win2K server over the local intranet
and
id like to be able to pick this up to save time and also prevent people
from
filing phony reports.
Thanks alot!
Carl
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
it seems as if register_globals option is turned off and therefore $submit
is not set.
hth
ilker
"James Meers" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello,
I have this form and its just not picking up the submit
variable however it is posting them!!!
Can someone double check this, what have i done?
James
<html>
<body>
<?php
include("newsconf.php3");
while (list($name, $value) = each($HTTP_POST_VARS)) {
echo "$name = $value<br>\n";
}
if (isset($submit)) {
mysql_query("INSERT INTO $ntable VALUES
('','$title','$posted_by','$entry',NULL)");
print("$title<br>\n");
print("Posted by $posted_by<br>\n");
print("$entry\n");
}
else {
print("<form action=\"addnews.php3\" method=post>\n");
$result = mysql_query("select name from $ptable")
or die("Query broke!<br>\n");
print("Posted By : <SELECT name=\"posted_by\">\n");
while ($row = mysql_fetch_array($result)) {
$name=$row["name"];
print("<OPTION value=\"$name\">$name\n");
}
print("</SELECT><br>\n");
?>
Title : <input type="Text" name="title" size=50><br>
News :<br>
<textarea rows=20 cols=80 name="entry"></textarea>
<p>
<input type="Submit" value="submit" name="submit">
</form>
<?php
exit;
}
?>
</body>
</html>
--- End Message ---
--- Begin Message ---
Or change the $submit to $_GET["submit"]
if (isset($_GET["submit"])) {
mysql_query("INSERT INTO $ntable VALUES
('','$title','$posted_by','$entry',NULL)");
print("$title<br>\n");
print("Posted by $posted_by<br>\n");
print("$entry\n");
}
/brother
> -----Original Message-----
> From: Ilker Cetinkaya [mailto:[EMAIL PROTECTED]]
>
> it seems as if register_globals option is turned off and
> therefore $submit
> is not set.
>
> hth
> ilker
>
>
> "James Meers" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> if (isset($submit)) {
> mysql_query("INSERT INTO $ntable VALUES
> ('','$title','$posted_by','$entry',NULL)");
>
> print("$title<br>\n");
> print("Posted by $posted_by<br>\n");
> print("$entry\n");
> }
--- End Message ---
--- Begin Message ---
try a combination of fgets and explode, like this
$f = fopen($fn, "r");
while($row = fgets($f)) {
$cols = explode(",",$row);
if ((int)$cols[0] == (int)$id) break;
unset($cols);
}
if ($cols) {
echo $cols[0];
echo $cols[1];
echo $cols[2];
}
guess should do it;
hth
ilker
"Frankthiel" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello, i couldnīt find an answer in the NewsArchive.
How can i parse a CSV file, and show a defined row taken from an url.
I have got this link www.something.com/something.php?id=234
the CSV example:
id,article,category
233,art1,cat1
234,art2,cat2
235,art3,cat3
I do know how i can parse a whole file with fgetcsv, but not how to parse an
explicit line.
THX for help.
Frank Thiel
--- End Message ---
--- Begin Message ---
Hi Everyone,
A shamless act of self promotion here :) but let me point you at the
following.
http://www.amazon.com/exec/obidos/ASIN/0735711690/
Andrew
--- End Message ---