> $query = "SELECT COUNT (login) FROM formacao WHERE login = '$login'";
> $result = mysql_query($query);
Make this line instead
$result = mysql_query($query) or die(mysql_error() . " with the query $query";
and you'll likely see the error.
--
Scott Noyes
> I want to find out if it is possible to get the file name and the line
> number of a calling script (__FILE__, __LINE_) from a calling class
> automatically.
debug_backtrace contains that info.
http://www.php.net/debug_backtrace
--
Scott Noyes
[EMAIL PROTECTED]
--
PHP General Mai
;niceness' onto a webpage so as
> they can be used as links to the files.
PHP is capable of doing that. I'd start with the dir() function, and
maybe a bit of printf.
http://www.php.net/dir
http://www.php.net/printf
--
Scott Noyes
[EMAIL PROTECTED]
--
PHP General Mailing List (http:
> Sure. Use debug_backtrace to figure out what line and what file the
> caller is in, then read that file, find that line, find the function
> call within that line, and read what ever is between the parentheses.
Something like this:
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
> is it possible to retrieve the name of a variable passed into a
> function from within the function?
Sure. Use debug_backtrace to figure out what line and what file the
caller is in, then read that file, find that line, find the function
call within that line, and read what ever is between the
> $mypath = "C:/phptestdir/";
> $file = "phpinfo.htm";
> $html_file = fopen("$mypath$file", "w");
> fwrite ($html_file, printf(phpinfo()));
> fclose ($html_file);
>
> How would I accomplish this?
ob_start();
phpinfo();
$content = ob_get_clean();
fwrite($html_file, $content);
--
PHP General Maili
> "Are you sure?" and then a "yes" and "no" buttons to confirm the deletion or
> to cancel the command.
>
> Any thougts??
While some of the others here have answered your technical question,
I'd like to state my opinion on usability.
I HATE "Are you sure?" prompts. If I wasn't sure, I wouldn't
> Suppose you have a form that posts set hidden values. A malicious user
> could modify the URI to change those values.
A malicious user could just as easily modify the http header that sets
the POST, or the cookie that sets the COOKIE, or whatever. In other
words, if it comes from the user, it
> mysql_connect(localhost,$username,$password);
> @mysql_select_db("$database") or die("Unable to Connect to
> DB");
> $tc_query = "INSERT INTO $tablel VALUES(NULL, $lname, $fname,
> $machine_name,
> $email_addr, $problem, NULL)";
>
> for($i=1;$i<13;$i++) {
> echo $i . " :: ";
> echo date('F', mktime(0, 0, 0, $i)) . " :: ";
> echo mktime(0, 0, 0, $i) . "\n";
> }
>
>
> 1 :: January :: 1107061200
> 2 :: March :: 1109739600
> 3 :: March :: 1112158800
Today is the 30th (in some parts of the world, anyway
> I'm taking my ZCE exam soon and would like general advice on what to
> study up on. I've been using php since 97 so I'm pretty confident with
> day-today stuff, but I'm pretty new to OOP and and looking for any study
> pointers I can get.
Remember that the ZCE still uses PHP 4. Classes and obje
It's not clear to me how strict you want to be regarding the
formatting. Are you trying to keep scenes together on each line, or
just dump everything and let it wrap where it needs to? Perhaps you
could handcode a sample and post a link. I'd also guess that you
could make good use of CSS, specif
Unserialize it, and then use var_dump() to see what the object contains:
var_dump(unserialize($location_data));
On 8/14/05, Gregory Machin <[EMAIL PROTECTED]> wrote:
> Hi
> The cms exponent story some data in a serialized array ..
> then column name id location_data and contains the following..
>
> [snip]
> Is it a bug that ($var == 0) is always true for any string $var?
> [/snip]
>
> You are comparing a string to an integer.
Right. This is clearly documented at http://www.php.net/operators.comparison
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
14 matches
Mail list logo