Jump to content

bd1e0d0

Members
  • Posts

    27
  • Joined

  • Last visited

Posts posted by bd1e0d0

  1. Yeah, I guess the one I was using was pretty generic. This one's better, using separate arrays for files and directories. Kind of a nice touch. Thanks, Clavin.

  2. if($handle=opendir('.')) {   while(false!==($file=readdir($handle))) {      if($file!=".") {         echo("$file<br />");      }   }   closedir($handle);}

    I think I'm using a generic file lister, ergo I think I'm screwed. Is there anyway through this script that I can make all the directories (folders) list first? If not, can anyone tell me a script that can?

  3. If you mean JavaScript alert, try this:

    <html>   <body onLoad="alert(document.getElementById("text").value);">      <input type="hidden" id="text" value="<?php echo($_POST['your_var_here']); ?>" />   </body></html>

  4. It's staring you right in the face! Your form was set to POST, and your variable was set to $_REQUEST. Use $_POST to get the variable. But if you wanted to use $_REQUEST, set the form to GET. Here (fixed up some of the XHTML for ya, too, also got rid of the comments beacuse I knew you put them there for this board):HTML File:

    <html>   <head>      <title>What’s your name?</title>   </head>   <body>      <h1>What’s your name?</h1>      <h3>Writing a form for user input</h3>      <form method="post" action="/hiUser.php">         Please type your name:         <input type="text" name="userName" value="" /><br />         <input type="submit" />      </form>   </body></html>

    PHP File:

    <html>   <head>      <title>hiUser.php</title>   </head>   <body>      <h1>Hi User</h1>      <h3>PHP program that receives a value from "whatsName"</h3>      <?php         $userName=$_POST['userName'];         echo("<h3>Hi there, ".$userName."!</h3>");      ?>   </body></html>

  5. In the meantime, you could get a basic Google Search box.Check this page out http://www.google.com/searchcode.html

    :) I kinda sorta knew how to make the Google search anyway. Although it's more simple to do this:
    <html>   <head>      <script language="JavaScript" type="text/javascript">         function gsearchme() {            window.location="http://www.google.com/search?q="            +            document.forms.google.q.value            +            " site:http://my.web.page/";         }      </script>   </head>   <body>      <form name="google" action="javascript:gsearchme();" method="get">         <label for="q">Google</label>         <input type="text" name="q" />         <input type="submit" value="Google Search" />      </form>   <body></html>

    It works, trust me. All browsers. :)

  6. if you want a content search (which i believe is what you want) AND your site has database content, it would be very easy.But if your site doesn't have database and you want to perform a search in the content embedded in the files, you'll have to be very creative and it may become a bit complex...If you want the latter and don't know how to start, I suggest you could create a separeted file containing only keywords and references to the sessions of your site.

    I don't do sessions, I view them the same as cookies. They're stupid and I hate them. [i actually don't know hoe to do them, heh heh ... ]
  7. How do I make a search script in PHP? I want simple because it's for a single site only. I was thinking of just having a form linked to Google, but I want that to be a last resort.

  8. You wrote: <Recipient>12345<Recipient/>I hope you didn't REALLY type it like that. It's suppsed to be <Recipient>12345</Recipient>, maybe that's another reason for the errors.

  9. I need some help with XUL. I've seen some sites with it, but I can't figure out how to use it. Does anyone know XUL? Or of a better site to help me? (Don't say W3Schools, cause they don't have it, they should, though :).) I wanna use it on a portion of my site, one that's very deep in XUL where I'll have to use gzip compression on (well, hopefully :)).

  10. Make sure that you know the difference from Class and Id. Use classes if it's going to be use more than once. Use ids if its only going to be use once or if it's going to be used with a JavaScript function.

  11. I find it easier to do this:

    <%   dim x   x=request.queryString("x")%>

    And this when it's needed in the page:

    <%if x="blah"%>   BLAH<%elseif x=null or x=empty%>   BLAH<%else%>   BLAH<%end if%>

    I don't mean to be mean, but it hurts my hand if I type to much, so I thought other people might benifit from this.P.S. - So that's what <!--#include virtual=""--> does! I usually just do <!--#include file="include.inc"-->. Looks like I'll be using it in the future.And for safety reasons, 022012, you might want to use the Post method so people can't steal your stuff.

  12. Live with it, VBScript is just easier with ASP.Somehow, you can have just regular JavaScript it the ASP tags and have it be plain ol' JavaScript. (Just not be seen by the client in the source code view.)Maybe because of this, they don't need to have you learn it again. It'd be just a waste of space on the server.

×
×
  • Create New...