[PHP] sessions and email

2009-11-12 Thread Dan Shirah
All, I am using sessions for my application to verify a user has logged in: // Verify the user is logged in. if (!isset($_SESSION['basic_is_logged_in']) || $_SESSION['basic_is_logged_in'] !== true) { // If not logged in, redirect to the login page. header('Location: login.php'); e

Re: [PHP] Re: NULLS vs Empty result in PHP

2009-09-23 Thread Dan Shirah
> > if it can take only numeric values u can use is_numeric() > > also i suggest that you not to use nulls in dbs. instead, use "not null" > and "default value" property. Its more simple and more effective for both > managing your database and coding your program. > > It's a CHAR (60) field. This

Re: [PHP] NULLS vs Empty result in PHP

2009-09-23 Thread Dan Shirah
> > From reading the other responses to this thread, it seems that you want > to > "skip" or "exclude" rows in the results where my_column === null. > > If this is correct, why not do it in the SELECT statement to begin with? > > $my_query = "SELECT my_column FROM my_database WHERE my_column IS NO

Re: [PHP] Re: NULLS vs Empty result in PHP

2009-09-23 Thread Dan Shirah
> > using empty() is ´the right way to check a var for NULL or "" > > however, it also depends what MySQL has got as setuo definition for empty > fields. on textfields u can define an epmty string as default. > > So say these are the first three results of my query: "some text" //The column actual

[PHP] NULLS vs Empty result in PHP

2009-09-23 Thread Dan Shirah
Morning! Just a quick question. Say I have a column in my database that could contain NULLS, empty spaces, or an actual value. If I do: $my_query = "SELECT my_column FROM my_database WHERE 1 = 1"; $my_result = ifx_query($my_query, $connect_id); while($row = ifx_fetch_row($my_result)) { $my_c

Re: [PHP] Date +30 comparison

2009-09-01 Thread Dan Shirah
> > I'm really struggling with dates in PHP. (Yes, I tried reading the > manual)... > > Can someone provide code that does this: > > Takes current date, assigns it to a variable (let's say $today) > Then adds 30 days to $today variable > Takes a string ($nexteval) like '8/26/2009' and compare it to

Re: [PHP] File Open Prompt?

2009-08-28 Thread Dan Shirah
> > You will need to add some headers to the page to popup the prompt, at least > with > these. > > $filename = 'somefile.tif'; > $filesize = filesize($filename); > > header('Content-Type: application/force-download'); > header('Content-disposition: attachement; filename=' . $filename); > header('C

[PHP] File Open Prompt?

2009-08-28 Thread Dan Shirah
Greetings, I'm having a problem trying to get a file download prompt. Basically I have a page with image links. When the link is clicked, the user is directed to another page I have. That page finds the image path based on the image ID from the previous page. Once the image path is found I copy

Re: [PHP] Freeing Memory

2009-07-31 Thread Dan Shirah
> > How does that work considering that mysql_query() only > returns true or false on INSERT? I'd expect the script > to fail on $result not being a valid resource. > I don't know about mysql as I work with MSSQL Server and Informix, but for me it works like this: $insert = ifx_prepare("INSERT

Re: [PHP] Freeing Memory

2009-07-30 Thread Dan Shirah
> > How would you go about ensuring the memory is not exhausted when running a > script ? > > I have a script, which to make it basic ... reads values from files, I > create an array of values per file then with a foreach insert values into a > table, I have added a line to echo the memory use aft

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Dan Shirah
On Tue, Jul 21, 2009 at 12:41 PM, Miller, Terion < tmil...@springfi.gannett.com> wrote: > Turned off the redirects on the whole script and tried to the the query to > echo and these are the errors I got: > > Notice: Undefined offset: 1 in /var/www/vhosts/ > getpublished.news-leader.com/httpdocs/Re

Re: [PHP] Search Query on two tables not working

2009-07-21 Thread Dan Shirah
> > Why isn't this working for searching? > > // Run query on submitted values. Store results in $SESSION and redirect > to restaurants.php$sql = "SELECT name, address, inDate, inType, > notes, critical, cviolations, noncritical FROM restaurants, inspections > WHERE restaurants.name <> ''

Re: [PHP] Alphabetical pagination

2009-07-14 Thread Dan Shirah
> > I am trying to make a page that displays a-z like a b c d e etc as links > then when you click open one it reloads itself and shows only the query > results that go with that letter...i'm not getting itI get a page that > says ARRAY over and over... > > What I have so far: >

Re: [PHP] PHP Print, PDF (w/FPDF), JavaScript

2009-05-20 Thread Dan Shirah
> > I can't find anything like this in FPDF 1.53 or in the documentation for > version 1.60. I'd be interested if you can pinpoint it. > > Paul > Sorry, you need to load a class extension, see the website below: http://www.fpdf.de/downloads/addons/36/

Re: [PHP] PHP Print, PDF (w/FPDF), JavaScript

2009-05-20 Thread Dan Shirah
> > > How can I click a button using JavaScript print function and have it > > generate a PDF with FPDF and get the PDF printed automagically? It seems > > I have done this before but I cannot recall what I did. > > > > TVMIA! > If I remember correctly there is an FPDF command **autoprint()** you

Re: [PHP] How to include a java script in a php tag (form)

2009-05-12 Thread Dan Shirah
> > > and there is a special > > $html = ' blablablablabla '; > > where all the html code is written for the form (table,...). > > The problem is that I have to include a javascript to be able to send the > form to my email address. I don't know where and how to put it. > > Could someone help

[PHP] Re: Array Brain Freeze

2009-03-19 Thread Dan Shirah
> > Hello all, > > I have the follwoing piece of code: > > //reference a stored procedure > $procedure = "Execute Procedure informix.arrest_char($part_id)"; > > //run the stored procedure > $char_query = ifx_query($procedure, $connect_id); > > //get the result of the stored procedure > $char_result

[PHP] Array Brain Freeze

2009-03-19 Thread Dan Shirah
Hello all, I have the follwoing piece of code: //reference a stored procedure $procedure = "Execute Procedure informix.arrest_char($part_id)"; //run the stored procedure $char_query = ifx_query($procedure, $connect_id); //get the result of the stored procedure $char_result = ifx_fetch_row($char

Re: [PHP] Whats the correct syntax for using query results in a new query

2009-03-03 Thread Dan Shirah
> > I'm trying to use the AdminID that returns from query #1 in the WHERE > AdminID = AdminID from Query 1 Okay, I think I understand what you are trying to do. //query 1 $query1 = "SELECT UserName, AdminID FROM admin WHERE Retail1 = 'YES'"; $result1 = mysql_query ($query1) ; while ($r

Re: [PHP] Execute EXE with variables

2009-02-13 Thread Dan Shirah
> > Use the system() command, and enclose both your command and its > parameters in a pair of single quotes, as: > > system('mycmd -a alfa -b bravo'); > > Paul > -- > Paul M. Foster > Using both exec() and system() I am getting the error: Unable to fork

[PHP] Execute EXE with variables

2009-02-13 Thread Dan Shirah
Hello all, Can someone point me in the right direction? I'm trying to call an EXE from PHP and pass it two variables. I looked at the exec() command and I see that this can call the executable, but I don't see that it can pass the variables to it. Dan

Re: [PHP] Using DLL with PHP

2009-02-11 Thread Dan Shirah
MAYBE a little closer to a solution! //VB for Reference Private Declare Function DTM_CONVDMSToMultiTIFF Lib "D32_CONV.DLL" _ (ByVal FullPathFrom As String, ByVal FullPathTo As String) As Integer Public Function hello(ByVal name As String) As String hello = "Hello" & name & "Worl

Re: [PHP] Using DLL with PHP

2009-02-10 Thread Dan Shirah
> > Just guessing as I haven't used the PHP COM stuff, but what do you get > if you change ByVal to ByRef? > > -- > Thanks! > -Shawn > http://www.spidean.com > Ooops! My fault! I created a new dll so I could keep the currently working one and forgot to register it.. Registered and it allowed

Re: [PHP] Using DLL with PHP

2009-02-10 Thread Dan Shirah
> > It doesn't appear that your function accepts a parameter. What does > this do: > > //VB > Public Function hello(ByVal name As String) As String >hello = "Hello " & name & "!" > End Function > > //PHP > echo $new_com->hello("Dan"); > > -- > Thanks! > -Shawn > http://www.spidean.com > Shaw

Re: [PHP] Using DLL with PHP

2009-02-10 Thread Dan Shirah
Alrighty, so I went a different route... I created my own ActiveX DLL...one that I know I can register. Starting out really simple: //My VB code Public Function hello() As String hello = "Hello World!" End Function //My PHP code hello(); echo $output;} Hello(); ?> So, after I register th

Re: [PHP] Using DLL with PHP

2009-02-09 Thread Dan Shirah
H, maybe it's not a problem with the DLL I'm trying to access because just doing a simple: $my_com = new COM("Excel.Application"); Gives me the same error: *Fatal error*: Uncaught exception 'com_exception' with message 'Failed to create COM object `Excel.Application': Invalid syntax ' I've c

Re: [PHP] Using DLL with PHP

2009-02-09 Thread Dan Shirah
> > I believe you do have to register it with regsvr32 for it to be visible. > > I think the GUID that Todd mentioned might even work, but I've only > ever used the ProgID. If you don't know the ProgID that is registered, > you should be able to find it in the Windows registry after you've > regist

Re: [PHP] Using DLL with PHP

2009-02-09 Thread Dan Shirah
> > I can't help much, but this might get you started. > > 1) Does the DLL you are trying to use actually supports COM. I know some > don't. > > 2) I'm pretty sure that the string you pass to new COM('...') should > be the name the class as registered with Windows, not the actual file > name. They

Re: [PHP] Using DLL with PHP

2009-02-09 Thread Dan Shirah
> > Check out the com [www.php.net/com] functionality > > Bastien > Alrighty, I'm trying to use the COM function, but not getting much of anywhere. This is what I have: DTM_CONVDMSToMultiTIFF("C:\TEST\04186177.dms", "C:\TEST\04186177.tiff"); } DMStoTIFF(); ?> But I am getting the error below: *

[PHP] Using DLL with PHP

2009-02-06 Thread Dan Shirah
Howdy, I'm looking for a little guidance here. I'm trying to re-write a VB function in PHP. This is the function I'm working with: Private Declare Function DTM_CONVDMSToMultiTIFF Lib "D32_CONV.DLL" _ (ByVal FullPathFrom As String, ByVal FullPathTo As String) As Integer Naturally

Re: [PHP] Preserving History

2009-02-05 Thread Dan Shirah
> > Hi gang: > > To further the Garbage Collection thread on to another level (i.e., > preserving history) please consider this: > > Okay, let's say we have a table containing all the instances of tutors > teaching courses. A record might look like this: > > Course-to-Tutor table > course_id = 123

Re: [PHP] Garbage Collection

2009-02-05 Thread Dan Shirah
> > Hi gang: > > A related question to my last "Clarity needed" post. > > I have a tutor table (showing all the tutors), a course table (showing all > the courses), and a course-to-tutor table (showing all the instances of what > tutor teaches what course). > > Okay, everything works. Whenever I wa

Re: [PHP] calculate the time that day ends

2009-02-03 Thread Dan Shirah
> Hi gang, > I was wondering if there is way to find out what is the time that every > day ends? I am planning to add this to the first page on an interface I am > developing. > > -- > Thodoris Doesn't every day end at 23:59:59? the next second would be 00:00:00...the beginning of a new day! :

Re: [PHP] Suggestions?

2009-01-13 Thread Dan Shirah
On Tue, Jan 13, 2009 at 2:14 PM, wrote: > > Hard to say without knowing the data structures... > > You can't do a simple count of the holidays and add that, because you might > end up with yet another holiday in the result. > > Start at 12/23 and want to add 6 business days. > > You find 1 holida

Re: [PHP] Suggestions?

2009-01-13 Thread Dan Shirah
On Tue, Jan 13, 2009 at 2:09 PM, Eric Butera wrote: > Are you asking how to do > > $holidays[] = date; > array_push($holidays, date); ? > > If you were generating dates to compare against today tho, you could > just return upon a match at that point and not even store them. No > point in creati

[PHP] Suggestions?

2009-01-13 Thread Dan Shirah
Hello all! I have written some code that will calculate all static and floating holidays. I have also written some code that will act as a business day counter. My application currently determines a set number of business days to count. (2 business days and 7 business days from today) This part

Re: [PHP] Another beginner question

2009-01-13 Thread Dan Shirah
On Tue, Jan 13, 2009 at 10:17 AM, Gary wrote: > I have successfully set up the testing server, now I would like to test it > out on the remote server, but "put" does not seem to be working. I saved > the > php document, click put, nothing seems to happen. I am connected to the > remote server, b

Re: [PHP] Data trasfer between PHP pages

2009-01-12 Thread Dan Shirah
> > Hi, > > I have one form where user fills data using radio buttons. Only one answer > goes from here to another page. > > FORM 1 > > > > 5 > > > 1 > > > 3 > > > > > --- > > FORM 2 > > There is another page has a form with 14 fields PLUS I need the data of the > p

Re: [PHP] Been staring at the code for too long...

2009-01-09 Thread Dan Shirah
> >mysqli_stmt_prepare($stmt, "UPDATE database.table ( >FName, LName, email, phone, > url, record, >subscribed, date, > IPAddress, Business, >Ad

Re: [PHP] Couple of beginner questions

2009-01-09 Thread Dan Shirah
> "so would I be correct that the only advantage to > having a page with a php extension is that you can use a testing server?" There are FAR more benefits! 1) PHP is FREE! So you save money from the get go 2) PHP is open source! So it is constantly being updated and improved by users/devs. 3)

[PHP] Re: [PHP-DB] Re: data from db to a page and then to another page

2009-01-07 Thread Dan Shirah
On Wed, Jan 7, 2009 at 3:01 PM, Mika Jaaksi wrote: > Thanks! I got it working... > Excellent, happy to help.

[PHP] Re: [PHP-DB] Re: data from db to a page and then to another page

2009-01-07 Thread Dan Shirah
> > Thanks for the aswers, but there is still some problems. > > I tested this code(below) and it works but when I add it to the rest of my > code it stops working. > > Here's the working code: > > page1: > > $bandname = "Someband"; > ?> > > > > > > and page2: > > Bandname is ! > > ___

Re: [PHP] redoing website after 7 years

2009-01-07 Thread Dan Shirah
> > > but, I'm more concern does client has to pay the changes/upgrade or it's > still "my obligation"? > > Of course you charge him. Christ if I was expected to maintain stuff > gratis that I wrote 7 years ago I'd be mullahed. > > -- > Richard Heyes I agree with Richard. I bought a car 7 years

[PHP] Re: [PHP-DB] data from db to a page and then to another page

2009-01-07 Thread Dan Shirah
On Wed, Jan 7, 2009 at 4:54 AM, Mika Jaaksi wrote: > I already can get the data from database to a page. Now I want to make link > from that data to next page and on that new page it should show all the > data > that is related. > > example: > > data from database > --> > page1 where listed: > >

Re: [PHP] Since I speak with some of you more than people I see in person....

2008-12-31 Thread Dan Shirah
> >And as a side note (some of you already know): for my wife and I > closing out the year, we heard the heartbeat of our first child for > the first time today in the ultrasound. Nothing else will ever again > matter as much to me as what I am about to embark upon. I don't think > any song o

Re: [PHP] First record not diplaying

2008-12-22 Thread Dan Shirah
> > Hi, I seem to have a bug in my code but can't see why. My first record >>> does >>> not display when I run a search. Can anyone spot what I have done wrong? >>> Thanks >>> >>> if (0 == $totalRows_rsSearch) { >>> echo "Sorry no products were found"; >>> } else { >>> echo "Please click on a pro

Re: [PHP] First record not diplaying

2008-12-22 Thread Dan Shirah
> > // Good to go > > if (0 == $totalRows_rsSearch) { > echo "Sorry no products were found"; > } else { > echo "Please click on a product for further information."; > while ($row_rsSearch = mysql_fetch_assoc($rsSearch)){ > echo " $row_rsSearch['product_image']."\"> > >". $row_rsSearc

Re: [PHP] Printing

2008-12-17 Thread Dan Shirah
> > You can't, the best you can do is send the PDF down and let the user >> choose to do with it what they will > > > > -- > > Bastien > So you think I should try and look into a way to have FPDF append each document to the already created document, and once all pages have been added to the PDF

Re: [PHP] Printing

2008-12-17 Thread Dan Shirah
> > Does it save them to a folder on the server? Or does it save them on the > client? > > If it is on the server then the server would have to send the docs to a > printer queue. > > If it is on the client PHP cannot really do anything about. PHP cannot > force the client to print but it could sen

Re: [PHP] Printing

2008-12-17 Thread Dan Shirah
> > Do you want to print this on your office printer or on the website users > printer? > > If you are looking for away to print it on their printer, why not just grab > all the files that need to be printed, make a PDF of it, and then use the > browsers print feature? > > > > -- > Jason Pruim >

[PHP] Printing

2008-12-17 Thread Dan Shirah
Hello all, Could someone please point me in the right direction for printing files through PHP? I already have my application setup so that it creates documents and saves them to a folder. How would I go about printing all of the files in the folder via PHP? I've looked into the Print functions

Re: [PHP] FPDF Printing Ideas?

2008-12-16 Thread Dan Shirah
On Tue, Dec 16, 2008 at 2:32 PM, wrote: > > Just generate a much larger PDF with all the pages they asked for and call > it done. > :-) I don't think I can do it that way unfortunately. They will be printing 100-300 records in bulk...the amount of time it would take to generate one giant PDF f

[PHP] FPDF Printing Ideas?

2008-12-16 Thread Dan Shirah
Hello all, I'm looking for some suggestions. I'm writing a new application that generates PDF's on the fly with FPDF. Basically I have a search page where you can search for customer records. Once your search has returned the records you can then click on a link which will send the record_id to

Re: [PHP] MSSQL_CONNECT problem

2008-12-10 Thread Dan Shirah
> > Is INTRA_SQL your instance name or database name? If it is the instance > name, is that instance setup to use 1433 as the port? I know 1433 is > the > default port for MSSQL, but the majority of people change that. > > > Correct - intra_sql is the instance, yes, it's using default port 1433 >

Re: [PHP] MSSQL_CONNECT problem

2008-12-10 Thread Dan Shirah
> > Try something like this: > > > > $dbhost=SERVER\\INSTANCE_NAME,PORT; > $dbuser="USERNAME"; > $dbpass="PASSWORD"; > $db_connect=mssql_connect($dbhost,$dbuser,$dbpass) or die ('Server > connection failed'); > > > > $mssql_database = mssql_select_db("DATABASE", $db_connect) or die ('DB > s

Re: [PHP] MSSQL_CONNECT problem

2008-12-10 Thread Dan Shirah
> > Sorry for "top posting", that's how my email client sets up the reply... > > Anyway, I don't know what CLI is? I see the error on the web. As for > a DSN, I didn't think I need one connecting this way. That is why the > uname, password, database is supplied, no? This should be a "dsn-less"

Re: [PHP] MSSQL_CONNECT problem

2008-12-08 Thread Dan Shirah
> > Can't seem to connect with MSSQL_CONNECT. The function IS available. I'm > in a Windows environment, connecting to a SQL 2000 instance. My code: > > mssql_connect('INTRA_SQL,1433', 'uname', 'password'); > mssql_select_db('database'); > > I've tried leaving the port out, tried using server IP ad

Re: [PHP] implode()

2008-11-18 Thread Dan Shirah
On 11/18/08, Terion Miller <[EMAIL PROTECTED]> wrote: > > I have read the whole forum at php.net on implode and I still don't get > why > this one does not work > > if (isset($_POST['BannerSize'])){$BannerSize = > implode($_POST['BannerSize'],',');} else {$BannerSize = "";} > > someone please help

Re: [PHP] CREATE question

2008-10-30 Thread Dan Shirah
On 10/30/08, Daniel Brown <[EMAIL PROTECTED]> wrote: > > On Thu, Oct 30, 2008 at 2:19 PM, Dan Shirah <[EMAIL PROTECTED]> wrote: > > > > Is it possible for us to use PHP to create temp tables in our database? > [snip!] > > > > But all that d

[PHP] CREATE question

2008-10-30 Thread Dan Shirah
All, Is it possible for us to use PHP to create temp tables in our database? Ironically, up until this point I have only needed to use SELECT statements. But now, to speed up the processing time of a large query I would like to create a temp table and then reference the temp table in another que

Re: [PHP] Building an array, kind of?

2008-10-24 Thread Dan Shirah
> > from memory. >> >> $var=''; >> while($row = mysql_fetch_array($charge_result2)) >> { >> $var .= $row['id'] . ','; >> } >> >> cheers, >> >> tedd > > Thanks all! It works and here is the code I used: $get_charges2 = "SELECT FIRST 16 * FROM history WHERE id = '$id"; $charge_result2 = ifx

[PHP] Building an array, kind of?

2008-10-24 Thread Dan Shirah
TGIF? Apparently my brain isn't working this Friday. I'm trying to query my table to get the first 16 ID's. I then want to assign the ID's to a variable and have them comma seperated. // My query to select the first 16 rows $get_charges2 = "SELECT FIRST 16 * FROM history WHERE id = '$id"; // E

Re: [PHP] Search functionality

2008-09-24 Thread Dan Shirah
> > Its pretty straight forward, you create a query that extracts the name >> and id of the records with a relevant where clause created on the fly. When >> outputing the data, each record gets created as a link that then loads >> another page/div with the total dataset for that record. The quest

[PHP] Search functionality

2008-09-22 Thread Dan Shirah
Hello all, I'm looking for suggestions on how to create a search function within my application. First I'll give you an overview. At the top of my page I have a form that contains name and date fields. When a user puts in some data and selects "Search" a simple column of results will be displaye

Re: [PHP] ODBC Functions & MS SQL Server 2005

2008-09-18 Thread Dan Shirah
On 9/18/08, Dan Joseph <[EMAIL PROTECTED]> wrote: > Hi, > > Anyone else using the odbc_* functions to interact with MS SQL Server 2005? > > I'm having a problem getting odbc_num_rows() to return anything other than > -1 when querying a stored procedure. I can get it to work using Top in a > norma

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Dan Shirah
> > Dan Shirah a écrit : > >> How about just adding a simple counter on your page. >> >> > That's what I do but that "counter" resets when you press F5 and is not > functionnal. > > Why $_GET['i'] doesn't unsets ? Are you sav

Re: [PHP] Google Chrome

2008-09-04 Thread Dan Shirah
Yippie, Chrome already exploited for DoS attacks? http://blogs.zdnet.com/security/?p=1847&tag=nl.e539

Re: [PHP] unset($_GET['i'])

2008-09-04 Thread Dan Shirah
> > Hi > > given page1 has a list of goods and sends $i as a variable into a link to > page2, ie, send > > Page2 adds the items recieved in an array. > > In page2 how can I unset the $_GET['i'] so that if I press F5(refresh) it > doesn't add the same item to the array ? > > I tried unset($_GET['i']

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
[SOLVED] Just wanted to let you all know I resolved all my problems. AUTH_USER holds a value once I go into IIS/Default Website and go tot he properties of my application folder. Deselect the Anonymous Access and check Intergrated Windows Authentication. For my connection issue I needed version

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
> > Yea I thought the same that is why I recommended the looking at logs idea. > > Perhaps maybe just running form cli will do it: > > [EMAIL PROTECTED]:~/Sites$ php5 blah.php > Point 1 > Fatal error: Call to undefined function ifx_connect() in > /home/eric/Sites/blah.php on line 3 You probably

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
> Does your script, the apache conf, virtual host conf, or a .htaccess > conf modify this setting? perhaps php.ini has more than one > display_errors entries? > > Cheers, > Rob. PROGRESS! It just clicked! About 3 years ago when I setup my first PHP server on Windows I saw someone mention that c

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
> > Your script is dying then. What does the error log say? Are you sure PHP > is using the php.ini you think it's using? Double check by using > phpinfo(). > > Cheers, > Rob. It is VERY strange! phpinfo() shows that it is using C:\Windows\php.ini phpinfo() also shows display_errors = Off but w

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
> > So you're script runs long enough for you to check? > > Cheers, > Rob. if (!$connect_id = ifx_connect("[EMAIL PROTECTED]", $user, $pass)) { Checks to see if it doesn't connect. If it does connect the page continues to process. If it doesn't connect the error is displayed. echo "Unable to c

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
> > Add the following: > > > echo ''."\n" > print_r( $_SERVER ); > echo ''."\n"; > > ?> > > See if the AUTH_USER entry is in there. AUTH_USER shows up, but does not have a value. From the output of phpinfo() it says, "No value" How do you know you don't get a connection to the database? What is

Re: [PHP] Confused

2008-09-02 Thread Dan Shirah
ECTED]> wrote: > > This does not seem to be an installation problem - > > Your test [(!$connect_id = ] fails, since the connect returns false, so it > does not run the condition. > > Compare: > > if($a = false){echo "no good";}else{echo "condition tru

[PHP] Confused

2008-09-02 Thread Dan Shirah
All, Okay, I am a bit confused. I'm setting up another server to host PHP pages. I followed everything in the Manual for installing PHP. I'm running Windows Server 2003, IIS6.0 and PHP 5.2.6. And...it kind of works... If I do: it prints fine. If I do: Today is: it prints fine. If I do: Yo

Re: [PHP] Assign things to users

2008-08-26 Thread Dan Shirah
> > Hi, > > This is more of a logic question than a PHP question. I wanted to get some > opinions on how some of you are doing things like this. > > I have a set of employees in our quote management system. We get thousands > of quotes per hour, and every 15 minutes I have a cron that goes out an

[PHP] Search Suggestions

2008-08-26 Thread Dan Shirah
Hello, I'm hoping to get a few good ideas on the best way to perform a search of PHP results. Currently I have a page that returns a list of collapsed customer data: Example + John Smith + Jane Doe + Robert Jones + Dale Bennett If the user clicks on a customer name it will expand the selection:

Re: [PHP] multiple question form creation

2008-08-26 Thread Dan Shirah
> > Hi, > > i have a web application in which some people should be able to create form > adding questions and possible answers. > basically user should: > 1. type the question (which will be displayed to customer) > 2. select type of answers (closed, open, list, multiple answer, and so > on...) >

Re: [PHP] loop weirdness

2008-08-19 Thread Dan Shirah
> Perhaps I'm not understanding correctly, but you can still use the while > loop if only a single row is returned, it'll just run the loop once. > > -Stut > That's what I thought also and is how I had it setup at first! But for some strange reason it always returned 4 identical results instead

Re: [PHP] loop weirdness

2008-08-19 Thread Dan Shirah
> > Your comments indicate you're trying to end the if in the middle of the >> while, but what PHP will be doing is ending the while where you want to end >> the if. I assume what you actually want to do is end both after the HTML is >> output, but I'm just guessing. >> >> -Stut > > Depending on s

[PHP] loop weirdness

2008-08-19 Thread Dan Shirah
Hello all! I'm having some weirdness with a loop. I am adding an conditional statement to my script to see if a condition is met before running a loop. All of the code up to this point works great so I have not included it since it is very long and extensive. Basically I have a query that runs a

Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
There you go! Entering in the search criteria pulls up the search in a new window and automatically pulls results based on your search. Then I can just close the window to return to where I was on your site. I think that is simple and easy to use. And I'm sure not much of a headache for you!

Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
On 8/15/08, Dan Shirah <[EMAIL PROTECTED]> wrote: > > GET should work too. Do you know of any examples anywhere online for >>> this? My brain shuts off at the thought of how I'd do that. >>> >>> - jody >> >> > When you GET a value you

Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
> > GET should work too. Do you know of any examples anywhere online for this? >> My brain shuts off at the thought of how I'd do that. >> >> - jody > > When you GET a value you are retrieving a passed value that appears in the address bar: Example http://www.mysite.com?name=joe www.mysite.com is

Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
> > I work for a consortium of 30 libraries. Each library has their own > website, but they all share the same web catalog. On each library's website > there is a search box to search the catalog, which is on a completely > different server from the websites. We've been finding that once people use

Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
> > That is exactly what I want. I apologize for the confusion. I was having a > hard time trying to put what I was trying to do in words. But, yes, your > second paragraph is exactly what I want to do. My knowledge of PHP is very > limited, and I've tried to search for something that will do this,

Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
> > So, I had this all wrong before. Basically, I need two forms, right? One >> on my originating page, and one on the page within the frameset I want to >> pass the values to. Correct? >> >> My form, which I named my_search has one input field, which I named query. >> In the javascript, I put in

Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
> > In the of my page, I have this: > > > function submitForm(var1,var2) { > top.mainFrame.document.my_search.text1.value = var1; > top.mainFrame.document.my_search.text2.value = var2; > top.mainFrame.document.my_search.submit(); > document.search_form.submit(); > } > > > If I type in a word

Re: [PHP] Displaying files

2008-08-15 Thread Dan Shirah
> > A scheduled task is messy. IIWY I'd use FTP to pull the file over, but > that's still pretty messy. > > If this is an Intranet then the risks involved in giving that user access > to the network is minimal and probably would be the best solution. > Alternatively you could set up an HTTP server

Re: [PHP] Displaying files

2008-08-15 Thread Dan Shirah
> > Your best bet would be to run a periodic sync to copy the files across >> from the other server but it would have to run outside the IIS process. >> There are plenty of solutions around for doing this and they have nothing to >> do with PHP. You can then refer to the local copy of the file fro

Re: [PHP] Re: Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
> > Frames?! >> >> As a fellow Wisconsinite and a web developer, I'm going to have to ask you >> to leave the state. Minnesota can have you. >> >> :P >> >> >> Jay >> >> >> PS - No, but seriously, frames?!?! > > There's nothing wrong with a Frame every once in a while! Granted they aren't used mu

Re: [PHP] Displaying files

2008-08-15 Thread Dan Shirah
> What about using some type of a dispatch script? Locate all the files >> outside of the doc root and then just call: viewdocument.php?ID=12345678 ? >> Although now that I've typed that I realize that you would still be running >> the same issue.. Unless you used javascript in your PHP to call th

Re: [PHP] Displaying files

2008-08-15 Thread Dan Shirah
Wow, I think it finally clicked. Sorry that took so long. The whole point behind using PHP was to try and copy or call the file from the server side so the user does not see the path to the document. Using HTML and Javascript it is extrememly easy to just view source and see the path. Whereas us

Re: [PHP] Displaying files

2008-08-15 Thread Dan Shirah
> > Because as I mentioned before PHP runs as a different user to your >> browser. >> >> -Stut > > Stut, Are you referring to this? "If you're using IIS then it's the IUSR_machine user which doesn't have access to the network by default" The IUSR_SERVERNAME account is what it should be connecti

Re: [PHP] Displaying files

2008-08-15 Thread Dan Shirah
Okay, I'm perplexed! If I put the exact same value into a javascript function and open a window the document comes up perfectly fine. But, when trying to readfile() copy() or fopen() in PHP I get the "failed to open stream:" error. Any idea why the exact same link would open fine using a HTML li

Re: [PHP] Displaying files

2008-08-15 Thread Dan Shirah
24, Boyd, Todd M. wrote: > > > > >> -Original Message- > > >> From: Stut [mailto:[EMAIL PROTECTED] > > >> Sent: Thursday, August 14, 2008 4:21 PM > > >> To: Dan Shirah > > >> Cc: PHP-General List > > >> Subject: Re: [PHP] Dis

Re: [PHP] Passing variable to a page in a frameset

2008-08-15 Thread Dan Shirah
> > I apologize for my ignorance, I don't really know much about > javascript. When I add all that into my form page, when I submit the > form, it just replaces the page I was on with the form results, rather > than in the new frame page. I'm assuming I need to put the url for the > frameset page i

Re: [PHP] Displaying files

2008-08-14 Thread Dan Shirah
That simply means it can't open the file. Make sure the machine this is running on has everything it needs to access that UNC filename. -Stut Stut, If I copy the link from the error message and paste it into a browser running from my PHP server, the file comes up just fine. Should I try mkdir

Re: [PHP] Passing variable to a page in a frameset

2008-08-14 Thread Dan Shirah
> > > Hello, > > > > I've got a website here: http://beta.menashalibrary.org/about > > > > On every page, i've got a search box at the top. This search box searches > > the library's web catalog. The problem is, when someone searches, it > takes > > them away from the site. What I'd like to do is t

  1   2   3   >