Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Broccoli2

  1. Broccoli2

    this script is ticking me off

    Have you tried putting the full path as the argument to readfile? eg readfile(dirname(dirname(__FILE__))."/directory2/test.zip');
  2. Broccoli2

    XML file to XHTML file using XSLT

    Yes, this is what XSLT does. I recommend consulting a basic tutorial on XSLT, eg the one at www.w3schools.com A basic example of XSLT usage is: <xsl:template match="nameofyourxmlelement"> <xhtmlelementsyouwant> <xsl:apply-templates /> </xhtmlelementsyouwant> </xsl:template> -Rob
  3. Broccoli2

    Making a Post.php page

    All you need to do is <script><!-- history.go(-1); //--></script> However, how about passing the previous page's url in a hidden field in your form? This would unfortunately mean adding a line to all the pages on your site, but it has the advantage that you could do all the redirection stuff...
  4. Broccoli2

    PHP script help

    What about simply echo "<option value=\"Male\"".(($sex=="Male")?" SELECTED":"").">"; echo "<option value=\"Female\"".(($sex=="Female")?" SELECTED":"").">"; Also, I would reiterate the comments above about putting quotes around your attribute values - it will save you time and effort in the...
  5. Broccoli2

    Note Sure If This Can Be Done - Can Someone Confirm?

    Couldn't you just do something like this: <xsl:template match=&quot;question&quot;> <xsl:value-of select=&quot;../narrative[@id=current()/@narrative_id]&quot; /> <xsl:value-of select=&quot;.&quot; /> </xsl:template> Perhaps I'm missing something here, but this would seem to be a simpler...
  6. Broccoli2

    XSL request uri

    What parser are you using? Server side or client side? If you are using something like PHP or ASP, you can pass the uri strings in as parameters to your stylesheet -Rob
  7. Broccoli2

    How to use xsl and display in 2 column table

    Try comparing position() with count() div 2, ie <xsl:template match=&quot;your_id_matching_expression_here&quot;> <xsl:choose> <xsl:when test=&quot;not(position() mod (count() div 2))&quot;> <tr> <xsl:call-template name=&quot;your_template_name&quot; select=&quot;.&quot; />...
  8. Broccoli2

    Creating a single webpage from multiple xml files

    How about <xsl:template match=&quot;/&quot;> <xsl:variable name=&quot;otherdoc&quot; select=&quot;document('otherdoc.xml')&quot; /> <xsl:apply-templates select=&quot;$otherdoc&quot; /> </xsl:template> Just a suggestion ... -Rob
  9. Broccoli2

    Open Form Instance as a Modal Form

    Hmm, not sure about your combo box problem. - Any event scripts running from them? - Any input masks/default values? Otherwise I'm not so sure -Rob
  10. Broccoli2

    Open Form Instance as a Modal Form

    Your code is fine, but you need to store your frm object somewhere, otherwise it gets destroyed at the end of your procedure. Try declaring frm as a public, module level variable, rather than in the procedure. -Rob
  11. Broccoli2

    New to PHP and getting cgi error

    I got this error on my Win2K server, and despite the documentation, it was only fixed by a reboot. Then all was fine. -Rob
  12. Broccoli2

    ________trim text size or MySQL Query Array______

    Altertatively, if you don't need the trailing characters at all in your php script, get MySQL to do the work for you: SELECT LEFT(fieldname,10) AS shortfieldname FROM yourtable; -Rob
  13. Broccoli2

    Can't access my session variables

    Are you starting your scripts with something like: session_name(&quot;MySessionID&quot;); session_start(); This needs to be on every page that requires access to the session vars. Also, are you using 'transparent' SIDs, or passing them manually? If manually, then adding the following to your...
  14. Broccoli2

    Subqueries in mySQL

    Try simply prefixing your final SELECT with CREATE TEMPORARY TABLE foo, then perform your secondary query on that. -Rob
  15. Broccoli2

    Subqueries in mySQL

    if by 'x-tab' you mean you want to perform a 'crosstab' query, as in *cough* MS Access *cough*, I'm afraid that it's non-standard SQL. There are workarounds, however - try http://www.mysql.com/articles/wizard/index.html -Rob

Part and Inventory Search

Back
Top