You need to encode the # mark. It is a special character in URLs.
Example (not a real url):
www.php.net/documentation.php#help
That #help points to an anchor in that page.
Try using the javascript escape() function.
http://www.javascripter.net/faq/escape.htm
~Ted
On 27-May-08, at 10:14 AM,
On 1-Jun-08, at 8:15 AM, Ryan S wrote:
Thanks for replying, but how and where do I put that into the
script? all that "this->" stuff is confusing
Tony Marsten's links seem to be very good, but let me offer you a
simpler introduction. Once you can think in an OOP fashion,
procedural-/
On 2-Jun-08, at 10:25 AM, Ed Curtis wrote:
I found the problem myself. The actual code follows the same
principal but the value of $thisStr is a $_GET value from a link.
The name of that value in the link was 'style'. Oops, you should
never use a HTML reserved attribute as a varible ident
How are you "calling thankyou.php"?
1. are you -redirecting- the user to that file?
--or--
2. are you -including- that file into register.php upon a successful
submission?
The method you're using determines how you best secure thankyou.php
from direct access.
If you're redirecting, then
1. If you're using cookies, there's no need to pass the session name
via the URL.
2. Is the cookie being created?
~Ted
On 2-Jun-08, at 11:32 AM, Razer MontaƱo wrote:
Hello All, my first time here at list.
Well, I am with a very weird question, never happened with me,
always worked fin
PJ,
I remember the days when this stuff seemed beyond mystical.
1. $dbh and $query are not "built-in" variables... but they need to be
defined somewhere earlier in the code. That could even be in a
different file if the file you're in has been included.
2. One trick to try is to use the php
You should be able to access the "Name" field using this syntax:
QueryResult->records[0]->sobjects[0]->fields->Name
Reading from left-to-right:
1. accessing index 0 (zero) of the "records" array.
2. accessing index 0 (zero) of the "objects" array.
3. accessing the "Name" property of the "fields
There's probably a regex solution that is most elegant, but here is
one solution:
if ($str == str_replace(array(' ', "\n"), '', $str)) {
// if you get here, then $str has no spaces or newline characters
}
~Ted
On 4-Jun-08, at 4:04 PM, Tyson Vanover wrote:
I need a quick way to mak
PHP at the command line doesn't run within a web server environment.
~Ted
On 9-Jul-08, at 11:07 PM, Sanjay Mantoor wrote:
Hi,
I found
$_SERVER['HTTP_USER_AGENT'] works when you are using with browser by
server like Apache.
If you are executing your code like script in command prompt it may
Object-oriented programming, with it's "class" and "object" approach,
is meant to model real life more closely than functional programming.
In, a "parking space" is physically inside a "parking lot", but a
parking space is not a subclass of a parking lot. It's not a variation
or mini park
Corrected code example:
(too early in the morning to think)
In the above class definition, simply populate the $spaces array with
instances of the ParkingSpace class.
~Ted
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PDO is distributed with PHP 5.1 and higher by default, but it can
still be excluded during the compile stage. This may be the case for
your installation. Run php_info() to find out, and if PDO is not
listed, ask your host to install it.
http://ca3.php.net/manual/en/pdo.installation.php
~
Not a syntax error. It's not successfully connecting to the database.
Check your settings.
~Ted
On 21-Jul-08, at 4:24 AM, Ronald Wiplinger wrote:
On a system with php4 and mysql 4.x I had these lines:
require("../db-config"); // includes $dbhost, $buname, $dbpass
$db = mysql_connect
The general rules of thumb are --> don't use references unless you
actually *want* a reference. And don't use references for performance
reasons.
Under PHP 4, it's generally been recommended to use a reference
operator when creating objects.
$obj =& new Object();
PHP uses refe
On 23-Jul-08, at 1:19 AM, Ted Wood wrote:
So PHP waits until a copy is actually needed before it makes one.
Explicitly making copies incurs overhead because of the concept of
"reference counting". So again, don't use references for performance
reasons.
That should'
In both PHP 4 and PHP 5, this would be an internal reference:
$a = $b;
until $b is changed.
The only exception is with Object handling under PHP 4, which had
flawed reference handling.
So, the rule remains -- don't use references for performance reasons
-- use them if you need references
Micah,
Please provide an example of what your response was referring to in
the original message.
And it is possible to have commands in the middle of a string by using
concatenation.
$str = "My name is ".strtoupper($name).'", but you can call me
Sam.";
~Ted
On 24-Jul-08, a
17 matches
Mail list logo