Jump to content

hansford

Members
  • Posts

    562
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by hansford

  1. the error message was just to tell you that $_GET is not set. you can simply echo "error"; ok, so $_GET['full'] is not getting set. Below is how you have your anchor tag. This will not do. if you're going to put php variables in there, then php must echo it out. why do you have target='_blank'? do you want to open a new window? <a href=viewfull.php?full=$r[id] target='_blank'>View</a> //will not work example: echo "<a href='viewfull.php?full=" . $r['id'] . "' target='_blank'>View</a>";
  2. I'm not seeing the form in your code, which is important in the way php will handle the form values. Please post.
  3. if you're passing an array. example, try <?php if(isset($_POST['array'])){ foreach($_POST['array'] as $key){ echo $key; } } ?>
  4. the args are not the same for jpeg. http://us3.php.net/imagepng
  5. start a session and pass the remaining items to page 2
  6. no html tags before the header. all the php you want, but no echos; -----------------------top of the page------------------- <?php //no whitespace before this tag your code with no echos; header('Location:http://www.anotherlocation.com'); ?> no whitespace between code and this tag ---------------------------------------------------------
  7. prior commenter is right, try this: $sql = "DELETE * FROM vote WHERE hidden = '48' AND number = '$vote' AND ip = '$ip' LIMIT 1";
  8. this has to be used before any whitespace before or after <?php, ?> or before any html is written out header('Location:http://www.anotherlocation.com');
  9. I tested it. <? $str = "<a href='http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=35839229'>video</a>"; $pattern = "/http:\/\/vids\.myspace\.com\/index\.cfm\?fuseaction=vids\.individual&VideoID=([_A-Za-z0-9?-]+)/"; $chk = preg_match($pattern, $str,$matches); if($chk){ echo $matches[0]; } ?>
  10. I got this to work. the problem is with [[:print:]]+ it grabs everything after the video id including ></a>. $pattern = "/http:\/\/vids\.myspace\.com\/index\.cfm\?fuseaction=vids\.individual&VideoID=([_A-Za-z0-9-]+)/";
  11. start with just getting the values, then you can add other code. There is no key =>value as the array is not associative. <?php if(isset($_POST['list2'])){ foreach($_POST['list2'] as $key){ echo $key . '<br>'; } } ?>
  12. he's right - sorry nickbunyun. I mis-typed and left out the ( character if(isset($_GET['full']))
  13. in fullview.php <?php ifisset($_GET['full'])){ $row_num = $_GET['full']; //connect to database //make your query $count=1; while($row = mysql_fetch_array($result)){ if($count != $row_num){ $count++; continue; } else{ //echo out all values in $row break; } } } else{ echo "An Error has occurred in sending the value of $_GET['full']"; } ?>
  14. bluejay002 is right. ` When you type "We're" it prints "We/'re" should be When you type "We're" it prints \"We\'re\" involking the addslashes() method
  15. firstly, get rid of selected='selected' and no need for name='list2[]' as just 'list' will do <select name='list2[]' id='list2[]'> <option value='$row[ractive]' selected='selected'>$row[ractive]</option> <option value='Yes' >Yes</option> <option value='No'>No</option> </select> to get the value selected it would be $selected = $_POST['list2']; the selected value will be whatever was selected. if nothing is selected it will default to the first option value listed in the form
  16. thats about as specific as I can get. create an anchor tag that when clicked will take you to some php page where you will use $_GET to get the value attached to the end of whateverpage.php?row=1 so $row = $_GET['row'] $row now holds the value 1, so you know to display row 1 from your DB
  17. you have to find the piece of code which assigns the onclick function to the span tags - I thought it was that one, but i guess not. The span tag for home is 0 in the array and the span tag for contact is 6 then when i == 0 OR i == 6 we skip this loop and go to the next
  18. echo 'here is some plain text where the google code would be';
  19. sure, but why would you go to all of that trouble when you can just put it in a form. Otherwise you have to create a gif for the checkbox, place it in a div, create an onclick event hadler to let you know it was checked, pass that to javascript then onto php etc...
  20. I don't know how your code is setup-my code was an example of how to do it. If you remove the last curly brace from my example you don't close out the while loop. As far as google is concerned I know nothing but, you have to sign up for it and then you can get code to embed.
  21. like I said before: a function is setup like this: function myFunction(){ } none of this $myFunction
  22. <a href="whateverpage.php?rowvalue=1">view row 1</a> then on whateverpage.php if(isset($_GET['rowvalue'])){ $row = $_GET['rowvalue']; //connect to database and get $row } or you could use ajax which I won't go into
  23. a function is setup like this: function myFunction(){} then try doing a function call. none of this: echo $myFunction; like this: myFunction();
  24. yeah. Make sure you have a good XMLHttpRequest and the readystate == 4 then check that -> this.req.responseXML.getElementsByTagName ("verifylevel")[0].firstChild.nodeValue; actually points to something
  25. we're missing the line number error and the xml document
×
×
  • 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.