User Profile

Collapse

Profile Sidebar

Collapse
andrewteg
andrewteg
Last Activity: Nov 3 '10, 08:45 PM
Joined: Aug 8 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • andrewteg
    replied to SMARTY template array search
    in PHP
    Thanks! That's a great resource and I appreciate your pointing me there!
    See more | Go to post

    Leave a comment:


  • andrewteg
    started a topic SMARTY template array search
    in PHP

    SMARTY template array search

    I have a few arrays in SMARTY with different values in them and need to know the best way to figure out which array a value is in as it loops over it. Basically array_search for smarty but I don't know if that's a function or how to best reproduce that in SMARTY.

    Thanks,
    Andrew
    See more | Go to post

  • It appears the solution in this case is a combination of removing the header("Pragma: no-cache"); and also adding session_cache_l imiter("must-revalidate"); before any session_start commands.
    See more | Go to post

    Leave a comment:


  • andrewteg
    started a topic Download Table to Excel in secure https for IE
    in PHP

    Download Table to Excel in secure https for IE

    I have the following code which has been working great in IE, FF, and Safari. However, it is not behind a certificate so it's https and now no longer works in IE. I am simply trying to download a SQL statement to XL.

    I found some info here on the site about removing the no-cahce header but that does not help. If I remove the Content-Disposition header it loads XL in IE but does not find the data to open.

    Can anyone...
    See more | Go to post

  • andrewteg
    started a topic Rewrite Rule

    Rewrite Rule

    I have an application that is installed as http://domain.com/folder/ and serves pages as http://domain.com/folder/index.ext/parent/child/ and I'm trying to remove index.ext from the URL so that http://domain.com/folder/parent/child/ would work as well.

    Does anyone have an idea on what rewrite rule I would need? I tried:

    RewriteRule ^(.*)$ index.cfm%{REQU EST_URI} [QSA,L]

    but that sends it to /folder/index.ext/folder/parent/child/...
    See more | Go to post

  • I'd love to know if anyone ever got Requirement #1 working with Flash and PHP. It seems like there would be a simple Flash and PHP solution out there to capture a signature or some similar drawing but I have not found much on the subject.

    As for the ASCII reading and #2, that I understand to be very difficult so I'm just interested in looking into how #1 can be solved at the moment :)
    See more | Go to post
    Last edited by andrewteg; Jun 27 '08, 07:15 PM. Reason: Want to clarify

    Leave a comment:


  • andrewteg
    replied to Firefox vs IE on Excel File Generation
    in PHP
    Quick Update: I just tried[PHP]header("Content-type: application/vnd.msexcel"); //application/x-msdownload OR application/vnd.msexcel OR ???[/PHP] and got the same results where it seems a lot better in IE than FF.
    See more | Go to post

    Leave a comment:


  • andrewteg
    replied to Firefox vs IE on Excel File Generation
    in PHP
    Here is my code for generating an XL sheet based on a query that's been built in another page. It's 32 lines but is a pretty basic loop. If I comment out the 4 headers at the end it loads the tab-delimited text well in both browsers so perhaps I'm using the wrong header or header settings?

    [PHP]
    $table = "Custom"; if (isset($_GET['table'])) $table = strtoupper($_GE T['table']);
    $header = "";
    ...
    See more | Go to post

    Leave a comment:


  • andrewteg
    started a topic Firefox vs IE on Excel File Generation
    in PHP

    Firefox vs IE on Excel File Generation

    I am using a script to generate XL files by just sending headers and even if I only send one row of data, it takes forever for the Firefox box to allow me to Open/Save the file ... however, in IE it comes up almost instantly, even when there are around 100 rows of data.

    Does anyone have any idea why this could be? It seems like a Firefox setting but I don't know what setting it could/would be.

    Thanks,
    Andrew
    See more | Go to post

  • andrewteg
    replied to $value versus &$value in foreach
    in PHP
    I know they are both valid. I did a foreach with the & and it changed the value of my variable but without it it did not!

    I have seen the code on www.php.net and actually just found this on http://www.php.net/foreach

    So it's a PHP5 thing that passes by reference and can modify your variable.

    Uses & so changes $arr
    [PHP]
    $arr = array(1, 2, 3, 4);
    foreach ($arr as &$value)...
    See more | Go to post

    Leave a comment:


  • andrewteg
    started a topic $value versus &$value in foreach
    in PHP

    $value versus &$value in foreach

    What is the difference between these two lines of code. I know in the second I added a & but what does that do exactly?

    [PHP]foreach ($arr as $value)[/PHP]

    [PHP]foreach ($arr as &$value)[/PHP]

    Thanks,
    Andrew
    See more | Go to post

  • andrewteg
    replied to Session not holding a value
    in PHP
    Also you can do a printout of phpinfo() and make sure session support is actually enabled. It'd be odd but it could happen....
    See more | Go to post

    Leave a comment:


  • andrewteg
    started a topic PHP naming sessions?
    in PHP

    PHP naming sessions?

    I have a few apps on my localhost that use the same session variable names ... as it stands now I can't be logged into both at the same time because of how they use the variables. This is good if they're ever installed on a shared server together but can get annoying. I was wondering if there is an easy way to name my sessions so the PHP session object realized they were in fact different.

    Hope this makes sense and thanks!
    See more | Go to post

  • Thanks Ronald. That'll do the trick.

    Searching around for dynamic variables I found this official doc too for anyone else who is curious... http://www.php.net/manual/en/language.variab les.variable.ph p
    See more | Go to post

    Leave a comment:


  • andrewteg
    started a topic Pass partial session variable name to function?
    in PHP

    Pass partial session variable name to function?

    I have some variables in the session object that have the same naming convention like so:
    form1Var1, form1Var2, form1Var3...
    form2Var1, form2Var2, form2Var3...

    I need to use all of them in a function and would like to pass just "form1" to the function and then recreate the form1Var1, form1Var2, etc and read those values from the session object.

    Is there an easy way to recreate the variables that...
    See more | Go to post

  • andrewteg
    started a topic Sort By Name Except Other

    Sort By Name Except Other

    I am trying to run a basic SELECT * FROM Table ORDER BY Name query but I want "Other" to be at the end of my list instead of alphabetically. Assuming I know that the text is Other and the ID # for Other, is it possible to do this with SQL Server or would I have to do it on the front end with the script?

    Thanks,
    Andrew
    See more | Go to post

  • andrewteg
    replied to SQLPlus SELECT Headers
    ah, thanks so much :)
    See more | Go to post

    Leave a comment:


  • andrewteg
    started a topic SQLPlus SELECT Headers

    SQLPlus SELECT Headers

    I am spooling some output using sqlplus command line tool and after about 10-15 rows it repeats the header (field names) in my testing. I was wondering if there was a way to suppress it from repeating the field names so I could get a more table-like output without having to delete the extra rows of field names thrown in.

    Thanks for any input,
    Andrew
    See more | Go to post

  • andrewteg
    started a topic PHP Session Variables with SSL?
    in PHP

    PHP Session Variables with SSL?

    Hi all,

    I'm starting a login system and it is possible that they will want to have SSL in the future, although my guess is this part will not and the ecommerce, if done, will.

    Anyways, I have used session variables before for login systems and was hoping anyone could give me some tips on if there is anything to watch out for since I have to keep my eyes open to SSL this time around.

    Thanks,
    An...
    See more | Go to post

  • andrewteg
    replied to Can I use Max and Count Together?
    Thanks, I added "AS VS" alias after the sub-query end parenthesis and before the main query group by and that works great. The DISTINCT was not needed and actually got in the way of other data oddly enough so I removed it.

    Thanks for your help!
    Andrew
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...