Jump to content

sd9sd

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sd9sd's Achievements

Member

Member (2/5)

0

Reputation

  1. that's true...it isn't secure...but nice to know that. btw, anybody knows that maximum length of a variable that can be passed in a $_POST or $GET?
  2. Problem solved!!! Using GET in the form and in the PHP worked. Thanks markjoe! Lemme guess...if there are two parameters that have to be passed, and you want only one of them to be shown on the addressbar, you can receive one of them as $_GET['user'] and the other as $_POST['password'] Am I right unkwntech?
  3. oh...got it...placing the post before the get was the problem..I'll get back after attempting a solution.
  4. Got it myself...the javascript has to be configured to send a query to php <script language="JavaScript" type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 var tagValue=selObj.options[selObj.selectedIndex].value; var stringCarryingQuery=tagValue.substring(0,tagValue.indexOf(" (")); var outputString=targ+".location='"+"a.php?tagSelection="+stringCarryingQuery+"'"; //document.write(outputString); eval(outputString); //if (restore) selObj.selectedIndex=0; } //--> </script> for <select name="tagSelection" onChange="MM_jumpMenu('self',this,0)">>
  5. Hi, I've got some html for a combobox: <td><form name="form1"><div align="center"> <select name="menu1" onChange="MM_jumpMenu('parent',this,0)"> <option>tag (23)</option> <option>tag (3)</option> <option>By Title</option> <option selected>Show All (92)</option> </select> </div> </form></td> I have a php file which echoes the html file to display it. I'm using this code for the php file to call itself: $path = empty($_SERVER['PATH_INFO'])?$_SERVER['PHP_SELF']:$_SERVER['PATH_INFO']; What I need is that when an option in the combobox is chosen, the option chosen should appear in the addressbar as a query string OR it should be available as a $_POST variable so that my php file should be able to capture it as either $_GET['id'] or $_POST['id'] Currently what's happening is: when an option is selected the php file calls itself, but the option chosen gets added to the address and it gets shown like www.site.com/optionChosen. I don't have a separate function to handle the MM_jumpMenu, but when I choose the option, how can I avoid it appearing in the addressbar and to capture it as a GET or POST?
  6. but it was not showing in the addressbar when it was a $_GET.
  7. erm..that's where the problem is. When I have a GET in the html, the query string shows up in the addressbar, but the toon does not get updated (which means that the toonValue isn't captured). So I changed the $_POST["toonValue"] to $_GET["toonValue"] and now the toonValue variable is captured, but the query string isn't shown in the addressbar.
  8. When I enter a value into the form and press enter, the php file calls itself and the form value is sent as a query string. The problem is that the query string doesn't get displayed in the addressbar. The strange thing is that when I used the same code earlier, it used to work. But ever since I've used a css file to change colour of the text, it stopped showing the query string. I don't think the css could have affected it, but I need the query string to be shown on the address bar like so: www.somesite.com/index.php?id=4 Any pointers? This is the piece of form HTML code <form name="form1" method="post" action="<TOONVALUEACTION>"> <span class="biglinks"># </span> <input name="toonValue" type="text" id="toonValue" size="6" value="<TOONVALUE>"> </form> And this is the last part of the php that replaces the TOONVALUEACTION string: if (file_exists("abc.html")) $template = implode("", file("abc.html")); //---for the php file to call itself $path = empty($_SERVER['PATH_INFO'])?$_SERVER['PHP_SELF']:$_SERVER['PATH_INFO']; $id=$_POST["toonValue"]; if ($id=="") $id=$_GET["id"]; $template = str_replace("<TOONVALUE>",$id,$template); $template = str_replace("<TOONVALUEACTION>",$path,$template); echo $template;//displays the page
  9. if your host provider doesn't allow remote access, one option is to move the remote domain onto the same server as the local domain. This way, you'll be able to access the database from both sites as localhost.
  10. Darn! isn't there ANY way to access the database then? I hoped that php would have a function like send_query("www.nothing.com/called.php?id=1"); But they haven't provided any such function either. Any ideas please? I need both websites to access the same database.
  11. I hoped the "yay" word would be captured by the GET or POST...but something tells me that it wouldn't work like that...
  12. Thanks Bendude14....I tried including it like this... This is the caller.php file on www.something.com <?php include("http://www.nothing.com/called.php"); $id=$_POST["id"]; echo "id value is =$id"; $id=$_GET["id"];//so that it'd receive the value either by get or post echo "id value is =$id"; ?> and this is the code in called.php <?php echo "yay"; ?> But it gives an error saying: Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/LOGINNAME/public_html/caller.php on line 2 Warning: include(http://www.nothing.com/called.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/LOGINNAME/public_html/caller.php on line 2 Warning: include() [function.include]: Failed opening 'http://www.nothing.com/called.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/LOGINNAME/public_html/caller.php on line 2 id value is =id value is = I'm still only starting to understand how to use php code, so please bear with me...how is this include supposed to be done?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.