Re: [PHP] reposting data into forms after confirmation screen

2003-07-07 Thread Matt Matijevich
You could save all of the form data in session variables, when they click edit re-populate the form fields with the session data. >>> "Artoo" <[EMAIL PROTECTED]> 07/07/03 04:00PM >>> Anyone know where I can view some sample code that does the following? When the user clicks on SUBMIT, they are ta

Re: [PHP] linking with home directory

2003-07-09 Thread Matt Matijevich
[snip] Like I said before, the style sheets load up fine on my Windows XP IIS server, but not the Windows 2000. In order to get it to work on the Windows 2000 IIS server, I have to link the style sheets relative to the folder I am working in, but I want to be able to move certain files into othe

RE: [PHP] linking with home directory

2003-07-09 Thread Matt Matijevich
I mean, when you actually call the script on the XP machine, where do you test it at? Do you use a browser that is on the XP machine that is running IIS, or do you do it from a different machine? >>> Matt Palermo <[EMAIL PROTECTED]> 07/09/03 10:52AM >>> The XP and 2000 are two different machines.

Re: [PHP] Simple forms query

2003-07-09 Thread Matt Matijevich
I am not 100% sure but I think you could use the $_POST array or the $_GET array (depending on the method of your form) with the print_r function. >>> "Enda Nagle" <[EMAIL PROTECTED]> 07/09/03 11:04AM >>> I know this has prob been gone through hundreds of times... I have a form, and I want to dis

Re: [PHP] nested for loops

2003-07-09 Thread Matt Matijevich
your syntax is correct, just need to change for ($j=0: $j < 5; $j++) to for ($j=0; $j < 5; $j++) >>> "Micah Montoy" <[EMAIL PROTECTED]> 07/09/03 12:56PM >>> Anyone ever do a nested for loop? $i =0; $j =0; for ($x=0; $x < 50; $x++){ echo ("1 to 50"); for ($j=0: $j < 5; $j++) {

[PHP] Can anyone please help me? Re: Using PHP to change unixenvironment

2003-07-09 Thread Matt Matijevich
Does anyone know if there is a way to change the referer information prior to using php's header function? I've tried things like: header("Referer: $referer"); where the $referer variable holds the original referer minus the search term without luck. How is the search term passed? Is it passe

Re: [PHP] nested for loops

2003-07-09 Thread Matt Matijevich
$result = mssql_query("SELECT * FROM files WHERE file_id = '$cat_name' ORDER BY file_name ASC"); $i = $col_num; $j = 0; $filename= mssql_result($result,0,"file_name"); $fileID = mssql_result($result,0,"file_id"); for ($k = 0; $k < mssql_num_rows($result); $k++) { //changes row color if

Re: [PHP] Credit card/Debit card validation

2003-07-09 Thread Matt Matijevich
I have a mod10 validation script written in another scripting language. I could try to convert it if you would like but I am sure that someone has already done it. Did you try google? http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&q=php+mod+10&spell=1 -- PHP General Mailing List (htt

Re: [PHP] Excel Parser

2003-07-10 Thread Matt Matijevich
Does anyone know of any free Excel parsing non-COM code available on the net? Just straight php driven? I have not tried any of these but there might be something in here you can use. http://www.phpclasses.org/search.html?words=Excel&go_search=1 -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Long lines

2003-07-11 Thread Matt Matijevich
can you tell me How can I set a line break in longs line of my code?. I think you want to use \n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] back button and session variables

2003-07-17 Thread Matt Matijevich
To make matters more confusing the problem occurs on Windows machines but does not occur on Macintoshes Could you give me a little more info about what is happening? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Matt Matijevich
The question is the - the assigned string key - is there a way to retrieve that in a loop? Foreach, for, while or otherwise? I think this is what you want. http://www.php.net/manual/en/control-structures.foreach.php foreach(array_expression as $value) statement foreach(array_expression as $ke

Re: [PHP] Multidimensional arrays

2003-07-18 Thread Matt Matijevich
select id, name from customer redim custarray(recordcount,2) i = 0 while not eof custarray(i,0) = id; custarray(i,1) = name; i = i+1; movenext wend Not sure what kind of db you are using but I put this together using postgresql using the manual. So this is untested. $conn = pg_c

Re: [PHP] learning php - problem already

2003-07-29 Thread Matt Matijevich
I do understand for loops and while loops but this is a bit confusing...do you haev any links I can read up on these? http://www.php.net/manual/en/ has all the info you need -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] include help please

2003-07-31 Thread Matt Matijevich
INDEX.PHP the problem must be when i am trying to include the $page variable get rid of the ' around the variable. $page = "something.php"; include $page; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: include help please

2003-07-31 Thread Matt Matijevich
I think you want -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using $PHP_SELF

2003-07-31 Thread Matt Matijevich
try $_SERVER["PHP_SELF"] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: include help please

2003-07-31 Thread Matt Matijevich
is there anyway where i can check if page is defined in the url? not sure I know exactly what you mean but I think you could use something like this $foo = @include("index.php"); if ($foo) { //index.php was valid } else { //index.php was not valid } there also might be a better way to do th

[PHP] String parsing help

2003-08-20 Thread Matt Matijevich
I have have a string that I need to split into 3 different variables: City,State, and Zip. Here is a couple examples of the strings I need to parse: ANCHORAGE AK 99507-6420 JUNEAU AK 99801 NORTH LITTLE ROCK AR 72118-5227 Does anyone have an idea how I could slit this into the appropriate v

Re: [PHP] HTTP transactions with PHP?

2003-08-21 Thread Matt Matijevich
Is it possible to make a complete HTTP transaction from within PHP? Like: - PHP sends request headers (with POST data) to $url - $url sends response back to calling script - PHP works with the response http://www.php.net/http http://nf.wh3rd.net/projects/http.inc/ I have not tested the functi

Re: [PHP] piping email directly into PHP

2003-06-11 Thread Matt Matijevich
I am no expert in email, but with a little help, I figured out how to use procmail to pipe email into a perl script and work with the data from the email in that script. So I am pretty sure it is possible using php as well. >>> "Adrian Teasdale" <[EMAIL PROTECTED]> 06/11/03 04:31PM >>> Hi there W

Re: [PHP] quotes

2003-06-25 Thread Matt Matijevich
When you view the html source is all of the text including the quotes there? >>> "Lso ." <[EMAIL PROTECTED]> 06/25/03 12:06PM >>> go ahead an try it. the quote is quite clearly in the database, but when i try to put it back in a form field everything is cut off after the quote. and i tried stri

Re: [PHP] php-general as REPLY TO

2003-06-30 Thread Matt Matijevich
>>> John Manko <[EMAIL PROTECTED]> 06/30/03 02:08PM >>> Hello, I'm wondering why the listed "Reply To" address is not "[EMAIL PROTECTED]" Thing would be so much easier to just reply than cut-n-paste when reply to the entire list on a subject (which is the norm). Can the maintainer set this u

RE: [PHP] PHP Interview questions

2003-08-28 Thread Matt Matijevich
Can you do it programmitically (with pseudo-code)? After all, we need to keep this on-topic :) not pseudo code and it could definatley be cleaned up or done better but her is my quick try at it echo "We are walking to up to a fork in the road."; $randval = rand(1, 500); $randval2 = rand(1, 500

Re: [PHP] evaluating dynamic variable

2003-09-02 Thread Matt Matijevich
this worked for me. "; } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form variables lost when duplicate records are found!

2003-09-02 Thread Matt Matijevich
[snip] then the forms variables are stored and NOT LOST ?? [/snip] Have you looked into sessions? http://www.php.net/manual/en/ref.session.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Fwd: Re: [PHP] Form variables lost when duplicate records arefound !

2003-09-02 Thread Matt Matijevich
Tuesday, September 2, 2003, at 05:13 PM, Matt Matijevich wrote: > [snip] > when the user comes back to the "add_new.php" > [/snip] > > I would use session vars in this case. > > You could also use get variables. > > Say the company name is in the database and you h

Re: [PHP] how to include() N lines?

2003-09-02 Thread Matt Matijevich
[snip] i need to include() only a given amount of lines (the first 10 for example) instead of a whole file. [/snip] I have never tried it, but I think you could open up the file you want to include, import n lines into a variable, then use the eval function to turn that variable into php code. S

Re: [PHP] Q on Class and EXTEND

2003-09-03 Thread Matt Matijevich
I dont know much about classes, but dont you want $a = new THECHILD('walter'); //so you can access $a->abc instead of $a = new THEPARENT ('walter'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Passing Objects between scripts and guarateeing that a language has been choosen.

2003-09-04 Thread Matt Matijevich
[snip] How can I guarantee that a language is always choosen? I mean how is this done professionally? What do I have to write at the beginning of every page? [/snip] You have a bunch of options. on each page you could add something like this to everypage: if (!isset($_SESSION['language'])){

Re: [PHP] Help with Displaying RSS feed links

2003-09-09 Thread Matt Matijevich
could you use this for your loop? $sizeArr = sizeof($items); for ($row=0; $row<$sizeArr; $row++) { echo "" . $items[$row]['title'] . "" . $items[$row]['description'] . ""; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] To Loop or Not to Loop?

2003-11-17 Thread Matt Matijevich
The code below inserts the same inventory item into the db multiple times - I just need 1 line entry for each inventory item, but multiple photos of each itemHow to do this? I know the code I wrote below is extremely awful, but I am a nebie and that was the only way I could get it to half-

Re: [PHP] string

2003-12-01 Thread Matt Matijevich
Name|17|5|7|12|26|8|4|0|2|0|40|12.50|3|33.30|19 it should 16 pieces. Any thoughts on how I can get it to cut off at the 19, one thing that I should say is 19 is value that can change. Can't you just use the explode function? http://www.php.net/manual/en/function.explode.php -- PHP General M

Re: [PHP] Session Expiration Problem....

2003-12-03 Thread Matt Matijevich
Is there a way to extend the php session timeout for particular pages? Alternatively, is there a way, other than using cookies, to store user data from page-to-page? I think you can use ini_set() to change session.gc_maxlifetime, that will change your session timeout. You could pass data around

Re: [PHP] Session Expiration Problem....

2003-12-03 Thread Matt Matijevich
** Low Priority ** Is there a way to extend the php session timeout for particular pages? Alternatively, is there a way, other than using cookies, to store user data from page-to-page? I think you can use ini_set() to change session.gc_maxlifetime, that will change your session timeout. You co

Re: [PHP] related products, how to's best practices

2003-12-04 Thread Matt Matijevich
** Low Priority ** >>> Jon Bennett <[EMAIL PROTECTED]> 12/4/2003 9:43:53 AM >>> Would I be right in thinking that php alone can't change the content of a dropdown once the browser has loaded the file without a page refresh ??? In which case I need to source out some javascript, anyone got any

Re: [PHP] PHP Web Services

2003-12-04 Thread Matt Matijevich
I am wondering if it is possible to create web services using php? If so, where would I go to find some resources about it? try google GIYF http://www.google.com/search?q=web+services+using+php&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8 -- PHP General Mailing List (http://www.p

Re: [PHP] PHP RSS sites and SlashDot

2003-12-05 Thread Matt Matijevich
Any idea how I can get a feed from Slashdot? or any other good programming\tech sites am basically trying to get a feed from around 4 sites for around 5 links each... http://slashdot.org/slashdot.rss try google, there is a bunch of good ones. -- PHP General Mailing List (http://www.php.net/

Re: [PHP] Operator question

2003-12-09 Thread Matt Matijevich
In PHP, what does the operator "-=" do? $var -= 1 is the same as $var = $var - 1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date conversion

2003-12-10 Thread Matt Matijevich
Hi, is there a PHP function that will convert MM/DD/ to MMDD? Also I will need to take into affect some people may put in M/D/ (some people may put in 1 instead of 01, 2 instead of 02, etc). Is there a way to do this? take a look at these functions http://www.php.net/mktime ht

RE: [PHP] upload script

2003-12-10 Thread Matt Matijevich
hi, I was wondering if anyonehad a script to upload files. Thank You http://www.php.net/features.file-upload -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] XML Strategdy

2003-12-11 Thread Matt Matijevich
Question is this. As a seasoned developer, my natural instinct is to just write a script(s) to access all the information that I need and write the appropriate information out to the file. Is there a better way to do this? Is there some type of application that has been developed that will take a

Re: [PHP] rss/rdf feed classes

2003-12-11 Thread Matt Matijevich
I'm looking for a class that returns a rss/rdf feed with each of the items as an array, or suggestions on how to items into an array... try google and freshmeat.net You should be able to find plenty of examples and classes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Page Redirects - How can it be done

2003-12-17 Thread Matt Matijevich
What if you use something like SourceForge. If you try to access a page the requires you to be logged in when it redirects you to the login page it includes in the URL the page that the user tried to access (ie login.php?redirect=page3.php) Then when the user successfully logs in they redirect to

Re: [PHP] need help getting one variable

2003-12-22 Thread Matt Matijevich
[snip] hello all i need help to enter one variable in a cookie and then retreive it back later, i know this probably sounds dumb to most but this is really the first time ive tried working with cookies so please bear with me, thanks for any help. [/snip] this should give you a good start http://ww

Re: [PHP] Working pop-up progress window

2003-12-22 Thread Matt Matijevich
[snip] I've had the most luck using the pop-up window method. In the element I call onSubmit="{open some window here}" This works as the pop-up appears while the file is transferring. Here's where I run into problems. I've tried all kinds of examples found on google and can never get it to work r

RE: [PHP] Parse error in mysql_query()

2003-12-22 Thread Matt Matijevich
[snip] Sorry, should have mentioned that I tried quoting them already. That gives a T_VARIABLES parse error. Thanks for the reply, Tyler [/snip] What happens if you comment out the mysql statement and just echo the variables? echo $_POST[domainregister_domain$i] $_POST[domainregister_ty

Re: [PHP] reading excell and writing to text file..

2003-12-22 Thread Matt Matijevich
[snip] I was wondering a good place I could get started on reading excel spreadsheets in PHP ive seen a couple of things out there that will take data from the web and transform it into a .xls file. I was wondering if I could take a XLS file with php and read it, and rip out certain data from it :-

RE: [PHP] Parse error in mysql_query()

2003-12-22 Thread Matt Matijevich
[snip] I put this right above like 871: print "$_POST[domainregister_domain$i]"; So now that "print" line is 871. It produces the exact same error as the mysql_query() line. [/snip] I should have mentioned this in my last email. You should try a print_r of the $_POST array. print ""; print_r($

Re: [PHP] evaluating a variable

2003-12-22 Thread Matt Matijevich
try eval($contentfunction); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] onChange

2003-12-22 Thread Matt Matijevich
[snip] I have 2 list fields in a form. The second is populated basing on selection in field 1. Can anyone pls tell me how to do this in PHP ? [/snip] you can't, onchange is fired with javascript on the client. You have a number of ways you can do it a few are. 1. have on change submit the form to

RE: [PHP] evaluating a variable

2003-12-22 Thread Matt Matijevich
[snip] Eval ($contentfunction); gave me a parse error: Parse error: parse error in /home/pickled/public_html/main/inc/html.php(145) : eval()'d code on line 1 [/snip] try to add a semicolon to the end of the variable $contentfunction = "newsadmincontent();"; -- PHP General Mailing List (http://

Re: [PHP] [Q] Best Practices Question - Directory Structures for WEB site dev using PHP

2003-12-23 Thread Matt Matijevich
[snip] 1) How do experienced developers layout their [dev] directory hierarchy? For example, is there an accepted place to put one's function libraries? On IIS (Windows XP), the default directory structure is c:\inetpub\ AdminScripts iissamples mailroot Scripts wwwroot\

Re: [PHP] Assist with session persistance

2003-12-23 Thread Matt Matijevich
[snip] ex: display.php session_start(); $agencyID=$_SESSION['agencyID']; $agencyName=$_SESSION['agencyName']; But after awhile, the session seems to fail and I end up back at the index page because the $agencyID gets voided. Is there a timeout on sessions other than c

Re: [PHP] Another Session Question

2003-12-31 Thread Matt Matijevich
[snip] session_start(); if($_SESSION['counter_file'] !==$counterFile)//See if visitor has already been counted for this page {$num += 1; $_SESSION['counter_file'] = $counterFile; } echo $_SESSION['counterFile'] . '

Re: [PHP] urlencoding.

2003-12-31 Thread Matt Matijevich
[snip] My problem is that any field that contains a double quote, all data after the first double quote is missing from the form field. When I look at the long URL I do see a %22 where the " are supposed to be, and all other data is there too. [/snip] Take a look at the html source. What is p

Re: [PHP] returning early from a function.

2003-12-31 Thread Matt Matijevich
[snip] function test($s) { if($s = 'this') return false; if($s = 'that') return false; return true; } [/snip] try this: function test($s) { if($s == 'this') return false; if($s == 'that') return false; return true; } -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Is there a way to protect PHP's $_POST, $_GET when user tamper with post string in URL toolbox

2004-01-07 Thread Matt Matijevich
[snip] I noticed when I use the hidden html input tag with hidden data in it then when I click the submit button to submit the webpage, the hidden data then show up in the URL address. [/snip] I think if you just change the request method to post, the data will not show up in the url. -- PHP

Re: [PHP] PHP code documentation tool

2004-01-08 Thread Matt Matijevich
[snip] What is the best way to document such projects? How you developers document your project? [/snip] GIYF http://phpdocu.sourceforge.net/ http://www.epersonae.com/snapping/archives/000390.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

Re: [PHP] upload and RENAME picture

2004-01-08 Thread Matt Matijevich
[snip] any ideas? [/snip] Have you tried move_uploaded_file? http://www.php.net/move_uploaded_file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] post vars not by form

2004-01-08 Thread Matt Matijevich
[snip] Anyone can help , how to post variables from server side .. as from php page to other without HTML form and submistion ??? [/snip] I have never used it but I think http://pear.php.net/package/HTTP_Client is what you want to look at -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Form validation: client- or server-side?

2004-01-09 Thread Matt Matijevich
[snip] why would you validate data on the server if you have a JavaScript that checked the user's input before it gets submitted to the server ? I mean the whole point of you having that JavaScript is to make sure the the correct data gets entered so why bother checking it once again on the server

RE: [PHP] to array or not to array..

2004-01-12 Thread Matt Matijevich
[snip] That works great, I am messing myself up, however because I am using checkboxes so when I run this, if I have unchecked the checkbox, the value doesn't come through and I want an unchecked box to be 0 for example so I may need some javascript... [/snip] Can only one option be checked per us

Re: [PHP] Destroy all session data...

2004-01-13 Thread Matt Matijevich
[snip] Until I get this sorted, can I kill everyones stored session data? [/snip] How is the session data saved? It is to files, you could just delete all of the session files. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Destroy all session data...

2004-01-13 Thread Matt Matijevich
[snip] I do't know to be honest, how do I find out? (I'm on a unix server) [/snip] you could use the phpinfo() function and check the value of session.save_handler, if it is "files" the session data is in files in the session.save_path directory. -- PHP General Mailing List (http://www.php.net

Re: [PHP] TMP directory problem

2004-01-14 Thread Matt Matijevich
[snip] When I had a look at the servers phpinfo and I saw that both "upload_tmp_dir" and "user_dir" have "no value" and "no value" set for them.how do I change it (via a .htaccess file as I dont have access to the php.ini) so that I can write the data as required from my script? [/snip] Take

Re: [PHP] URL rewriting...anybody done this?

2004-01-14 Thread Matt Matijevich
I am a little late but I have used the method described on a list apart http://www.alistapart.com/articles/succeed/ and it works really well. You might want to give it a try, I think it works a little bit different than the way you are trying. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Dynamic Forms

2004-01-15 Thread Matt Matijevich
[snip] Can anyone suggest a PHP solution to creating a form that gets built after a client enters a variable? [/snip] php runs on your server so to build the forms based on a user entered form field, the form has to be submitted, so you would have to use javascript to automatically submit the for

Re: [PHP] getimagesize() to find type?

2004-01-16 Thread Matt Matijevich
[snip] (1) How would I do that (use getimagesize() instead to find type)? [/snip] http://php.net/getimagesize [snip] (2) Stupid question: how do I say if ($_FILES['imagefile']['type'] != "image/pjpeg") and add "image/jpeg" to that constraint? [/snip] there are many ways, I will show you an

Re: [PHP] thumbnail

2004-01-20 Thread Matt Matijevich
[snip] How I can create thumbnail with php? using the GD libray? [/snip] yes. Also I hear imagemagick works well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] thumbnail

2004-01-20 Thread Matt Matijevich
[snip] OK, but how? I already use GD, I need to now how to create a thumbnail, somebody now how to use the GD functions to create a thumbnail??? [/snip] http://www.php.net/GD I think you want to look at: imagecopyresampled -- Copy and resize part of an image with resampling imagecopyresized --

Re: [PHP] str_replace and TABS

2004-01-21 Thread Matt Matijevich
[snip] I'm using the following to replace certain characters but am having troubles with TABS. How do I find them? $replacement = array("\"", ",", ".", "!", "?",";", ":",")","(","\n"); Thanks [/snip] I think \t . Double check with google. -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] Form validation

2004-01-21 Thread Matt Matijevich
[snip] Can some one point me in the right direction for a good tutorial on form validation in PHP? Thanks, alex hogan [/snip] I like to use regular expressions for my form validation. Search google for reugular expressions, you will get a bunch of results. Also take a look at the php ma

RE: [PHP] Form validation

2004-01-21 Thread Matt Matijevich
[snip] Hi, you can do it on server site (php code) or client side (javascript code) DS [/snip] Is this a question? If it is, yes you can use regular expressions with javascript and php. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] query strings, global variables

2004-01-21 Thread Matt Matijevich
while ($row = mysql_fetch_array($selection)){ if (section == $sectionName){ echo "" . $row["sectionName"] . ""; }else{ echo $row["sectionName"]; } thx Not sure if I understand you 100% but I think you could just either check the $_GET or $_REQUEST array. Something like this: i

Re: [PHP] Login variable is empty but password is OK. Why? (newbie question)

2004-01-21 Thread Matt Matijevich
try this: print ""; print_r ($_POST); print ""; do you see nome in there? I think the reason $senha has a value in it is md5 gives you a string even if you pass it a blank value. I would use these 2 variables $_POST['nome'] and $_POST['senha'] also look at register_globals on the php.net websi

Re: [PHP] Get First 20 Characters of a Variable or Database Entry

2004-01-21 Thread Matt Matijevich
http://us2.php.net/substr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session variables

2004-01-22 Thread Matt Matijevich
If you store session variables , but the user has session cookies disabled, is there any way to recuperate those session variables? Yes, look at the session.use_trans_sid variable. http://www.php.net/session If cookies are disabled, php will pass the session id as a ur variable or a hidden f

Re: [PHP] passing session ID

2004-01-22 Thread Matt Matijevich
If I want to store a session id in a database, how would I do it , like this? $session_id=SID ; ? and then if I want to retrieve this session id and get all of the info back that goes with this session id, I would say session_start() and then what? thanks You could just have php store all of th

Re: [PHP] Showing local date & time

2004-01-22 Thread Matt Matijevich
Should I use setlocale()? I mean is there a way which will give me the local datetime without calculating the difference manually? I have not used it, but it looks like setlocale() will give you what you want. http://www.php.net/manual/en/function.setlocale.php Suppose that I want to show th

Re: [PHP] generating arrays using $_REQUEST/$_GET/$_POST

2004-01-22 Thread Matt Matijevich
I am having problems generating an array based on data passed from a form. The form has a series of fields with the same name "math". When submited if i have register_globals=on i have no problems calling a $math variable and it spits out all the values assigned to math, however with register_glob

RE: [PHP] generating arrays using $_REQUEST/$_GET/$_POST

2004-01-22 Thread Matt Matijevich
echo ""; $Student = array ("albert Einstein", "Ivan the Terrible", "Napolon", "Simon Bolivar", "Issac Newton"); while(list(,$name)=each($Student)){ echo "what grade did $name get in Maths?"; echo""; echo " Grade A Grade B

Re: [PHP] Shared mod_php doesn't always load php.ini

2004-01-23 Thread Matt Matijevich
Hi, I noticed that often mod_php loaded as a shared library by apache doesn't load php.ini, and I have to restart apache to make it work. Apache version is 1.3.28 and Php is 4.3.4, all compiled by me. They are running on an updated RedHat 7.3. Is it a known (and solved) problem? I may be way o

Re: [PHP] simple ?- load page after submit

2004-01-23 Thread Matt Matijevich
Or, correctly: header("Location: http://www.yourdomain.com/personalpage.php?id=$id";); to add to what john said, you could make it a little easier to move your script from place to place if you use some php variables and the dirname function. this comes right from the manual: http://"; . $_S

Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich
I have about 8 different pages that are all session linked. Do I have to add this ini_set() at the beginning of all the session_start() calls on all these pages. Not 100% sure, but I think if you dont add ini_set() before all of your session_start() calls, session.gc_maxlifetime would get se

Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich
Also if I were to create a .htaccess file that is kept in the same dir as the application, what do I need to include in that file ? something like: php_value session.gc_maxlifetime 25000 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich
I'm really curious to see if any of this really works. I know it _should_, but... Assuming a shared/virtual server where all session files for all sites are in the same location. When the garbage collector is triggered by a request to the site with this setting in .htaccess, does it honor this se

Re: [PHP] send a POST to a URL from within PHP code

2004-01-26 Thread Matt Matijevich
With a GET, the fields would be included into the query strinbg, so this is quite easy. What happens in a POST? take a look at http://pear.php.net/package/HTTP_Request -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: question PHP - HTML

2004-01-26 Thread Matt Matijevich
If you "View Source" in IE, you'll see it printed in the expected way. The browser, though, will not show it as you expect it. This is because the browser needs a tag for a newline and will not read a \n as a . So, use instead of \n. you could also wrap the text in tags. -- PHP General Ma

Re: [PHP] getting content with fput, SESSIONS and frames

2004-01-26 Thread Matt Matijevich
HTTP/1.1 302 Found Date: Mon, 26 Jan 2004 11:38:51 GMT Server: Apache X-Powered-By: PHP/4.3.1 Location: http://domain.tld/c17c340a3e6a2cb268451f3eda5930ce/frameset.php?q=string Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pra

Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip] Is the following code the best way to redirect someone to a different page using PHP? http://www.yahoo.com";); ?> I looked for a "redirect" function of some kind and didn't come up with anything. Just curious what the consensus is... [/snip] yes http://www.php.net/header has a good wa

Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip] That's also known as "breaking the back button", but is the only way to do it in PHP. A better way to redirect someone (and keep the back busson working) is to use the meta html tag. [/snip] How is that breaking the back button? -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip] Also, when you're using PHP, it is rare that it is going to be better to use a meta tag to emulate an HTTP header. PHP has the header() function, and it can set real headers. [/snip] also, meta refreshes are easy to turn off. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Matt Matijevich
http://www.php.net/readdir -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Print out all the files in a directory

2004-04-17 Thread Matt Matijevich
on that page ther is examples -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problems with patterns

2004-04-21 Thread Matt Matijevich
you need to account fir white space if you want phrases \s+ I would switch to preg_match() instead of ereg() http://www.php.net/manual/en/function.preg-match.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] self documenting php

2004-04-22 Thread Matt Matijevich
[snip] What is a good tool to use for documenting php? I am looking for something like javadoc. I think there is phpdoc, just not sure if it's any good or if I should try to create my own. [/snip] http://pear.php.net/package/PhpDocumentor -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] oblivious to the obvious

2004-04-23 Thread Matt Matijevich
[snip] $sun_5a_n1 = "1"; $sun_5a_t1 = "2"; if($sun_5a_n1) { $result = mysql_query("UPDATE sunday SET a5_n_1='$sun_5a_n1',a5_t_1='$sun_5a_t1'") while($row = mysql_fetch_array($result)) { (line 17)echo "Sunday @ 5am slot modified to Name: $sun_5a_n1, Time: $sun_5a_t

Re: [PHP] Webcapture to PDF

2004-05-13 Thread Matt Matijevich
[snip] Looking for a (open source) solution here: is there some way that I can convert an already existing HTML page to a PDF file, by means of a script (on a unix box)? [/snip] You could try http://www.easysw.com/htmldoc/ I have not used it but there is php examples on the site -- PHP Gener

Re: [PHP] PHPSESSID Being Stubbornly Persistent

2004-05-13 Thread Matt Matijevich
[snip] ini_set('session.use_trans_sid', '0'); [/snip] I think, at least according to the manual session.use_trans_sid can only be set in php.ini, .htaccess or httpd.conf http://www.php.net/ini_set look at session.use_trans_sid -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

  1   2   >