phpnewbie05 Posted June 29, 2006 Share Posted June 29, 2006 Hello, I need help with this: I have a [true/false] answer pulled from a mysql database and displayed in html. Now, I want to php to write a link next to it(the answer) that will flip the answer to false/update the table and rewrite the new url to flip it back to the original case. Anyhelp on this would be great. Example: Want More: Yes <== Now Want More: Yes [a href=\"http://stuff\" target=\"_blank\"]No?[/a] <== Once clicked, it will be No [a href=\"http://stuff\" target=\"_blank\"]yes?[/a] Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/13259-php-link-manipulation/ Share on other sites More sharing options...
mitzleah Posted July 6, 2006 Share Posted July 6, 2006 Hey,You have to have a conditional statement here. Put a [color=red]Get Variable[/color]. For example:if ([color=red]$_GET['status'][/color] == 'No') { print 'No [a href=\"http://stuff\[color=red]?status=Yes[/color]" target=\"_blank\"]yes?[/a]';} else { print 'Yes [a href=\"http://stuff\[color=red]?status=No[/color]" target=\"_blank\"]No?[/a]';}Hope I'm getting you. Hope this one will help! Quote Link to comment https://forums.phpfreaks.com/topic/13259-php-link-manipulation/#findComment-53638 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.