Jump to content

hellonoko

Members
  • Posts

    213
  • Joined

  • Last visited

Everything posted by hellonoko

  1. That works better but still does not pick up tags. I was working with this: <script type="text/javascript"> varURL = window.location.href; window.location.href = varURL + "?URL=" + varURL; </script> <?php echo $_GET['URL']; ?> But it does not quite work right. I am quite sure how to tweak it to make it do what i want. -ian
  2. Thanks. But that seems to add a ? to the end of the URL why is that? Ive also noticed that it does not seem to capture #tags or GET variables ?&variable=value.
  3. I am trying to get the full query string from the browser. I have tried a few things. HTTP_REFERER / PHP_SELF / REQUEST_URI But id like to capture the full complete URL. Any ideas? Thanks, Ian
  4. Can anyone give me any ideas why my below page works fine on my WAMP setup but not on my host? The list and delete functions of the script work fine on both but the INSERT query only works on WAMP on my computer. Thanks for your time, Ian <title>Yummy!</title> <?php mysql_connect("www.empireofstyle.com","so","yummy")or die ("Could not connect to database"); mysql_select_db("yummy") or die ("Could not select database"); $action = $HTTP_GET_VARS[action]; $category = $HTTP_GET_VARS[category]; $id = $HTTP_GET_VARS[id]; echo $action; echo $category; echo "<br><br>"; echo $id; if ($action == "add_category") { $query = "INSERT INTO categories (category) VALUE ('$category')" or die (mysql_error()); $result = mysql_query($query); } if ($action == "Delete") { $query = "DELETE FROM categories WHERE id=$id" or die (mysql_error()); $result = mysql_query($query); } $query = "SELECT * FROM categories"; $result = mysql_query($query); $rows = mysql_num_rows($result); $rows; echo 'Number of categories: ' . $rows ; echo '<br><br>'; for ($i=0; $i <$rows; $i++) { $row = mysql_fetch_array($result); echo "<form id=delete_category name=delete_category method=get action=listcategories.php>"; echo "<input name=action type=submit value=Delete >"; echo "<input name=id type=hidden value=".$row[id].">"; echo $row[category]; echo "<br>"; echo "</form>"; } ?> <form id="add_category" name="add_category" method="get" action="listcategories.php"> <input name="category" type="text" id="category" /> <input name="Add" type="submit" value="Add" /> <input name="action" type="hidden" value="add_category" /> </form>
  5. I am using a: header("Location: http://location.com"); call to redirect after a form is posted. However the form page is within an iFrame and after the redirect the new web page is loaded within the iFrame rather than in the main page as i need it to be. Is there anyway I can specify the target or can someone suggest a better way to break out of the iFrame. Thanks
  6. [!--quoteo(post=359315:date=Mar 28 2006, 11:42 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Mar 28 2006, 11:42 AM) [snapback]359315[/snapback][/div][div class=\'quotemain\'][!--quotec--] Exactly. That's because fopen() returns a file handle number. You need to use fread() to actually read the contents of the file. You could also use fgets() in a loop. [/quote] i had to use file_get_contents() but i got it working. thanks!
  7. [!--quoteo(post=359286:date=Mar 28 2006, 10:16 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Mar 28 2006, 10:16 AM) [snapback]359286[/snapback][/div][div class=\'quotemain\'][!--quotec--] [code]<?php for($i = 0; $i < count($myarray); $i++) {      if(substr($myarray[i], -2) == 'ab')           // do something } [/code] And yes, fopen() opens both remote and local files. [/quote] when i use fopen() to open a URL i get only: Resource id #4 I asume it is opening the page but not putting the acctually contents into my varriable.
  8. [!--quoteo(post=359281:date=Mar 28 2006, 10:08 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ Mar 28 2006, 10:08 AM) [snapback]359281[/snapback][/div][div class=\'quotemain\'][!--quotec--] How is your list of words setup? Is it an array? Is it all in a string? I'd use the substr() function to look at the words and determine if it matches your pattern. I would use fopen() for that, but I'm going to guess that you're not allowed to use that function either... but maybe. [/quote] the list of word will be put into an array. does fopen() work for remote files and urls as well as files on the server?
  9. I need to go through a list of words and find ones with certain letters in the last two places. I know how to code this but am not sure of what str functions I would use. I am looking around a little in the PHP manual can anyone point me in the right direction? Also my host does not support the php5 fuction stream_get_contents() What would be an alternative function for getting the contects of a HTML page and processing them in my php page. Thanks in advance.
  10. I am trying to open a URL with PHP. I have tried fopen() and fsockopen() but neither seems to work. Any ideas? Thanks in advance.
  11. Can anyone point me in the right direction for finding someone to program for me? Kind of like the PHP Freelancing forum on this site but for a windows app. Thank in advance, noko
  12. i am looking for a tutorial on adding a scrambled text image authentication system to my web site. where you have to enter the displayed warped letter/numbers in order to submit a form. can anyone point me in the right direction? thanks
×
×
  • 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.