Re: [PHP] working with files

2004-01-28 Thread Matt Matijevich
replace ?php $handle = fopen ($filename, r); do { $data = fread($handle, 128); if (strlen($data) == 0) { break; } print ($databr); } while (true); fclose($handle); ? with this ?php $handle = fopen ($filename, r); do {

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

2004-01-26 Thread Matt Matijevich
snip With a GET, the fields would be included into the query strinbg, so this is quite easy. What happens in a POST? /snip 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
snip 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 br tag for a newline and will not read a \n as a br. So, use br instead of \n. /snip you could also wrap the text in pre tags.

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

2004-01-26 Thread Matt Matijevich
snip 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,

Re: [PHP] create a file

2004-01-26 Thread Matt Matijevich
snip How can I create a file (txt) in client-side? /snip I dont think there is a way unless you are using some kind of java applet. You can create the text on the server and give the user a link to save the text file on their computer. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How to prevent - Page has expired

2004-01-26 Thread Matt Matijevich
snip I know that this is not a PHP problem, but Is there a way to prevent the 'Page has expired...' when the user press 'Back' /snip post to a page that does nothing but process the form post. When it is done, it redirects to another page. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] random alphanumeric value generator

2004-01-26 Thread Matt Matijevich
because it is MySQL, couldn't you just use mysql_insert_id http://www.php.net/manual/en/function.mysql-insert-id.php instead of this: //now get the random number, and MD5 it to get it alphanumeric $query = 'SELECT MAX(uiIndex), cKey FROM randomKey GROUP BY cKey'; $result =

Re: [PHP] Remove Dynamic String between StringA and StringB

2004-01-26 Thread Matt Matijevich
snip Hi :), i'm looking for a function to remove multiple dynamic parts of a string, there are only the start and end strings given (remove all between string A and string B) got somebody a working procedure for that? regards /snip a start of a procedure I have $stringA = string A; $stringB

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

2004-01-23 Thread Matt Matijevich
snip 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? /snip I

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

2004-01-23 Thread Matt Matijevich
snip Or, correctly: header(Location: http://www.yourdomain.com/personalpage.php?id=$id;); /snip 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: ?php

Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich
snip 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. /snip Not 100% sure, but I think if you dont add ini_set() before all of your session_start() calls, session.gc_maxlifetime

Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich
snip 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 ? /snip something like: php_value session.gc_maxlifetime 25000 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Session time-out value

2004-01-23 Thread Matt Matijevich
snip 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

Re: [PHP] session variables

2004-01-22 Thread Matt Matijevich
snip If you store session variables , but the user has session cookies disabled, is there any way to recuperate those session variables? /snip 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

Re: [PHP] passing session ID

2004-01-22 Thread Matt Matijevich
snip 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 /snip You could just have php store

Re: [PHP] Showing local date time

2004-01-22 Thread Matt Matijevich
snip Should I use setlocale()? I mean is there a way which will give me the local datetime without calculating the difference manually? /snip 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 snip Suppose that I

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

2004-01-22 Thread Matt Matijevich
snip 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

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

2004-01-22 Thread Matt Matijevich
snip echo form method='get' action='exams2.php'; $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?; echobrbr; echo select name='Math[]'

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 unsubscribe, visit:

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

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
snip while ($row = mysql_fetch_array($selection)){ if (section == $sectionName){ echo b . $row[sectionName] . /b; }else{ echo $row[sectionName]; } thx /snip Not sure if I understand you 100% but I think you could just either check the $_GET or $_REQUEST array. Something like

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

2004-01-21 Thread Matt Matijevich
try this: print pre; print_r ($_POST); print /pre; 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

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] 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] 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] 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

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 a look

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] 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

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

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

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:

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

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] 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

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

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

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

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 form 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

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]

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 brbr$_POST[domainregister_domain$i]brbr; 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 pre;

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

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

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

2003-12-17 Thread Matt Matijevich
snip 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

Re: [PHP] XML Strategdy

2003-12-11 Thread Matt Matijevich
snip 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

Re: [PHP] rss/rdf feed classes

2003-12-11 Thread Matt Matijevich
snip 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... /snip 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

Re: [PHP] date conversion

2003-12-10 Thread Matt Matijevich
snip 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? /snip take a look at these functions

RE: [PHP] upload script

2003-12-10 Thread Matt Matijevich
snip hi, I was wondering if anyonehad a script to upload files. Thank You /snip 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] Operator question

2003-12-09 Thread Matt Matijevich
snip In PHP, what does the operator -= do? /snip $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] PHP RSS sites and SlashDot

2003-12-05 Thread Matt Matijevich
snip 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... /snip http://slashdot.org/slashdot.rss try google, there is a bunch of good ones. -- PHP General Mailing List

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

2003-12-04 Thread Matt Matijevich
** Low Priority ** snip 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

Re: [PHP] PHP Web Services

2003-12-04 Thread Matt Matijevich
snip 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? /snip try google GIYF http://www.google.com/search?q=web+services+using+phpsourceid=mozilla-searchstart=0start=0ie=utf-8oe=utf-8 -- PHP General Mailing List

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

2003-12-03 Thread Matt Matijevich
snip 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? /snip I think you can use ini_set() to change session.gc_maxlifetime, that will change your session timeout. You could pass

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

2003-12-03 Thread Matt Matijevich
** Low Priority ** snip 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? /snip I think you can use ini_set() to change session.gc_maxlifetime, that will change your session

Re: [PHP] string

2003-12-01 Thread Matt Matijevich
snip 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. /snip Can't you just use the explode function? http://www.php.net/manual/en/function.explode.php -- PHP

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

2003-11-17 Thread Matt Matijevich
snip 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

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 trtda href= . $items[$row]['link'] . . $items[$row]['title'] . /abr . $items[$row]['description'] . /td/tr; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

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] 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] evaluating dynamic variable

2003-09-02 Thread Matt Matijevich
this worked for me. ? $entries = 20; for ($i=1; $i=$entries; $i++) { if(isset($_POST[resolutions$i]) $_POST[resolutions$i] !== ''){ echo Hello $ibr /; } } ? html body form method=POST input type=hidden name=resolutions1 value=etefgtE / input type=hidden name=resolutions3

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
On 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 have to redirect back to add_new.php, in your

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.

RE: [PHP] PHP Interview questions

2003-08-28 Thread Matt Matijevich
snip Can you do it programmitically (with pseudo-code)? After all, we need to keep this on-topic :) /sip 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.br /; $randval = rand(1, 500); $randval2 =

Re: [PHP] HTTP transactions with PHP?

2003-08-21 Thread Matt Matijevich
snip 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 /snip http://www.php.net/http http://nf.wh3rd.net/projects/http.inc/ I have not tested

[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

Re: [PHP] include help please

2003-07-31 Thread Matt Matijevich
snip INDEX.PHP ?php require 'files.inc.php'; $page = '$home'; include '$page'; ? the problem must be when i am trying to include the $page variable /snip get rid of the ' around the variable. $page = something.php; include $page; -- PHP General Mailing List (http://www.php.net/) To

[PHP] Re: include help please

2003-07-31 Thread Matt Matijevich
I think you want ?php $home = 'home.html'; $forum = 'forum/index.php'; $contact = 'contact.html'; include $contact; ? -- 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
snip is there anyway where i can check if page is defined in the url? /snip 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

Re: [PHP] learning php - problem already

2003-07-29 Thread Matt Matijevich
snip 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? /snip 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] Multidimensional arrays

2003-07-18 Thread Matt Matijevich
snip 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 /snip Not sure what kind of db you are using but I put this together using postgresql using the manual. So this is untested.

Re: [PHP] back button and session variables

2003-07-17 Thread Matt Matijevich
snip To make matters more confusing the problem occurs on Windows machines but does not occur on Macintoshes /snip 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
snip The question is the - the assigned string key - is there a way to retrieve that in a loop? Foreach, for, while or otherwise? /snip I think this is what you want. http://www.php.net/manual/en/control-structures.foreach.php foreach(array_expression as $value) statement

Re: [PHP] Long lines

2003-07-11 Thread Matt Matijevich
snip can you tell me How can I set a line break in longs line of my code?. /snip 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] Excel Parser

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

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

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 display all

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++) { echo (less

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

2003-07-09 Thread Matt Matijevich
snip 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. /snip How is the search term passed? Is

Re: [PHP] nested for loops

2003-07-09 Thread Matt Matijevich
snip $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=enlr=ie=UTF-8oe=utf-8q=php+mod+10spell=1 -- PHP General Mailing List

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 taken to a

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 up? John

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 stripslashed,

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 We are

<    1   2