Re: [PHP-DB] [PHP]: session problem

2004-06-24 Thread Matt Matijevich
[snip] But when I ask the value of a registered session variable on another page, it is empty?!?! Does anyone know how this comes? i am using session_start() at every page.. [/snip] try the $_SESSION array for starage of session variables. -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] [PHP]: session problem

2004-06-24 Thread Matt Matijevich
[snip] i do ($_SESSION['sid']), but the variables remain empty... [/snip] If you are using the array forget about session_register. http://www.php.net/session_register Could you post a little code? That will make this easier to solve. -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] [PHP]: session problem

2004-06-24 Thread Matt Matijevich
do you get any output on the second page if you do this? ?php session_start(); print 'pre'; print_r($_SESSION); print '/pre'; if ( isset($_SESSION['logged_in'])){ echo Welcome...; }else{ header(location: user.php?action=9); } ? -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] regular expression help

2004-06-24 Thread Matt Matijevich
try this $password = 'abcdef'; if (preg_match ('/\w\d\w/', $password)) { die (You must have a number between 2 letters in your password ... 0-9); } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] regular expression help

2004-06-24 Thread Matt Matijevich
you only want to check to see if there is at least one digit? If that is true, this should work: if(preg_match('/\d/',$password)) { echo 'password ok'; } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] regular expression help

2004-06-24 Thread Matt Matijevich
[snip] That does not work either... I can not make the statement fail!!! I have tried $password = 123456; and $password = abcdef; I have change the if statement to what is below and past in all letters and it still works? if (preg_match ('/\d/', $password)) { die (You must have a number

Re: [PHP-DB] help with consecutive numbers in db

2004-06-24 Thread Matt Matijevich
[snip] The IP's (for example 192.168.1.1) are all in a single field. [/snip] If it is a possiblity, I would store each IP in its own row, with a column in that row being some kind of flag, like: is_issued as a logical column. Can you change you db layout or is it set in stone? -- PHP Database

Re: [PHP-DB] DB and mssql

2004-04-14 Thread Matt Matijevich
[snip] Hi Matt Before sending the result set, the mssql extension stores the entire result set into memory. However, PHP limits the amount of memory that can be allocated by a script to 8MB. So, the query will fail if the result set is larger than 8MB. You can change this value in php.ini with

[PHP-DB] DB and mssql

2004-04-13 Thread Matt Matijevich
I am using PEAR::DB on linux, php 4.3.2, with freetds to access a sql server database. I am trying to get more information on the problem, but everyonece in a while, it seems random, php will stop executing when I use the query method, php stops executing. I dont get an error, php just stops

Re: [PHP-DB] MySql query

2004-03-17 Thread Matt Matijevich
snip SELECT * FROM sometable Just that :) (do I hear you slapping your forehead? :) Bruno Ferreira. /snip Thanks for the answers guys. My problem was I am a mysql novice and there was a bunch of existing queries that use the WHERE 1 syntax. -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] apache/php/mysql - guarenteed DB transaction

2004-02-04 Thread Matt Matijevich
snip So if a user hits submit on a webpage, the transaction under the hood completes, no matter if the user hits cancel or his browser dies or whatever. (Not sure how to even test this condition, but I know it will happen) /snip Once php has the request, hitting cancel on the browser or a browser

Re: [PHP-DB] apache/php/mysql - guarenteed DB transaction

2004-02-04 Thread Matt Matijevich
snip Actually whether the script runs through to completion depends on the 'ignore_user_abort' setting. /snip wow, guess you learn something everyday. wish I would have known about that when I wrote a php script with some terrible (lots of joins, just poorly designed) queries that took down my

RE: [PHP-DB] apache/php/mysql - guarenteed DB transaction

2004-02-04 Thread Matt Matijevich
snip Suppose I have several DB transactions that I want to treat as 1 logical transaction that I need to complete guarenteed. For instance, an INSERT to one table, and a DELETE to another, and an UPDATE to a third. All need to complete once a user selects submit. What's the best approach to this

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread Matt Matijevich
snip WHAT DOESN'T HAPPEN is that the query_string values DO NOT trump the default variables. so query_string = ?class=Xsection=Yorder=ASC I can't input these variables : $class,$section,$order into the SQL statement SELECT * FROM classes WHERE section=$section ORDER BY $class $order /snip I am

RE: [PHP-DB] using query_strings in sql

2004-01-21 Thread Matt Matijevich
snip I have no knowledge (YET) of how to prevent sql injection attacks with php. /snip Just yesterday I read a short tutorial on http://www.dotgeek.org on how to prevent sql injection. The site is down right now for maintenance otherwise I would have a direct link to the article for you. try

Re: [PHP-DB] Missing Data in Columns

2003-12-10 Thread Matt Matijevich
snip Any ideas? /snip could you post the code you use to output each table row? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Web counter question..

2003-12-05 Thread Matt Matijevich
snip James Hatridge [EMAIL PROTECTED] 12/5/2003 10:52:52 AM Hi all.. I just put up my stamp bulletin on line (issue #100!!). I have a problem with it. The counter that I use counts everyone every time they look at the site. I want a better counter, can you all suggest one? It's got to work

Re: [PHP-DB] I 'am not so goooood with php....

2003-12-03 Thread Matt Matijevich
** Low Priority ** snip ?php $tel = 1; $dbrows = mysql_num_rows($rsSubGroup); ? ?php do { ? ?php if (($tel % 2) 0) {echo tr; echo td; echo $row_rsSubGroup['name']; echo /td; if $tel == $dbrows{ echo /tr; } }

Re: [PHP-DB] Uploading files

2003-12-02 Thread Matt Matijevich
snip Warning: move_uploaded_file(./images/exec/Editor.jpg): failed to open stream: Permission denied in /home/hudson/misc/dtr8hcj/public_html/changeexec.php on line 24 /snip php needs permission to write to that directory. Check the permissons on ./images/exec/. -- PHP Database Mailing List

Re: [PHP-DB] Ifs, ands, or buts

2003-08-27 Thread Matt Matijevich
http://www.php.net/manual/en/language.operators.logical.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Simple Referrer

2003-08-27 Thread Matt Matijevich
$_SERVER[HTTP_REFERER] http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Newbie PHP/MySQL question

2002-12-20 Thread Matt Matijevich
I am just getting started with php an mysql. When I try to insert a record php get stuck in some kind of loop and about 25 records are created. Any help would be greatly appreciated. Windows 2000 server latest service pack. PHP 4.2.3 MySql 3.23 IIS 5.0 -- PHP Database Mailing List