hansford
Members-
Posts
562 -
Joined
-
Last visited
-
Days Won
4
Everything posted by hansford
-
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>";
-
I'm not seeing the form in your code, which is important in the way php will handle the form values. Please post.
-
if you're passing an array. example, try <?php if(isset($_POST['array'])){ foreach($_POST['array'] as $key){ echo $key; } } ?>
-
the args are not the same for jpeg. http://us3.php.net/imagepng
-
Dividing items in a shopping cart script into multiple pages
hansford replied to persel's topic in PHP Coding Help
start a session and pass the remaining items to page 2 -
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 ---------------------------------------------------------
-
prior commenter is right, try this: $sql = "DELETE * FROM vote WHERE hidden = '48' AND number = '$vote' AND ip = '$ip' LIMIT 1";
-
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');
-
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]; } ?>
-
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-]+)/";
-
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>'; } } ?>
-
he's right - sorry nickbunyun. I mis-typed and left out the ( character if(isset($_GET['full']))
-
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']"; } ?>
-
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
-
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
-
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
-
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
-
integrating 3rd party info into database search results display
hansford replied to rhock_95's topic in PHP Coding Help
echo 'here is some plain text where the google code would be'; -
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...
-
integrating 3rd party info into database search results display
hansford replied to rhock_95's topic in PHP Coding Help
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. -
like I said before: a function is setup like this: function myFunction(){ } none of this $myFunction
-
<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
-
a function is setup like this: function myFunction(){} then try doing a function call. none of this: echo $myFunction; like this: myFunction();
-
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
-
we're missing the line number error and the xml document