00stuff Posted April 9, 2011 Share Posted April 9, 2011 I have a php page that is trying to pass a variable like this: echo "<tr><td bgcolor='white'>" . $company_id . "</td><td bgcolor='white'><a href='companyusers.php?name=" . $company_name . "'>" . $company_name . "</a></td><td bgcolor='white'>" . $company_email . "</td><td bgcolor='white'>" . $company_status . "</td></tr>"; Then when some one clicks on that link they variable with it's value should go with the url and I'm trying to assign a variable like this: $company_name = $_POST['name']; It is not working!!! I get that "Notice: Undefined index: name in 'directory of page' on line 100" Can someone help please? Quote Link to comment https://forums.phpfreaks.com/topic/233206-trying-to-pass-a-variable-with/ Share on other sites More sharing options...
Pikachu2000 Posted April 9, 2011 Share Posted April 9, 2011 You're using a $_GET var, but trying to access a $_POST var. Quote Link to comment https://forums.phpfreaks.com/topic/233206-trying-to-pass-a-variable-with/#findComment-1199319 Share on other sites More sharing options...
00stuff Posted April 10, 2011 Author Share Posted April 10, 2011 Thank you, that was it. Don't know how I missed that. I can't seem to be able an set this post as resolved. Quote Link to comment https://forums.phpfreaks.com/topic/233206-trying-to-pass-a-variable-with/#findComment-1199534 Share on other sites More sharing options...
Pikachu2000 Posted April 10, 2011 Share Posted April 10, 2011 Yeah, the 'Mark Solved' button was a plugin, and the last forum upgrade knocked it out temporarily . . . Quote Link to comment https://forums.phpfreaks.com/topic/233206-trying-to-pass-a-variable-with/#findComment-1199535 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.