kamal213 Posted July 20, 2011 Share Posted July 20, 2011 Hi Guys, Ok this is might be a strange and new request. I have a php page with a link on the side menu which when you click you can add a customer into my database. I would another link (to book an appointment) to appear on this page when the customer has been added or the link should be disabled before the customer is added and enabled when the customer is added. Is this possible? Please help Thanks alot Quote Link to comment https://forums.phpfreaks.com/topic/242434-php-disable-and-enabling-a-link/ Share on other sites More sharing options...
AyKay47 Posted July 20, 2011 Share Posted July 20, 2011 there are a few ways that this can be done..you can have the link hidden until the customer data has been added to the database, i would recommend doing this with jquery. You can also have the link present, but have it disabled until the customer data is submitted, again you can do this with either jquery or javascript...or even CSS..depends what route you want to go Quote Link to comment https://forums.phpfreaks.com/topic/242434-php-disable-and-enabling-a-link/#findComment-1245147 Share on other sites More sharing options...
kamal213 Posted July 20, 2011 Author Share Posted July 20, 2011 Thanks for your reply!! Do you kno of any online links that can help or an example you could show as I am not good with jquery/javascript. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/242434-php-disable-and-enabling-a-link/#findComment-1245158 Share on other sites More sharing options...
Eiolon Posted July 20, 2011 Share Posted July 20, 2011 You can query the database to see if the customer has been added. If it returns a row (mysql_num_rows) then echo the link. If no rows are returned, then echo nothing. Quote Link to comment https://forums.phpfreaks.com/topic/242434-php-disable-and-enabling-a-link/#findComment-1245169 Share on other sites More sharing options...
AyKay47 Posted July 20, 2011 Share Posted July 20, 2011 you can look around the jquery site for what you need, this doesn't necessarily need to be done with jquery, but they have cool effects and such and make it easier on the code to use javascript with there functions.. http://jquery.com/ as for the javascript method, you can simply good something like "javascript disable link" Quote Link to comment https://forums.phpfreaks.com/topic/242434-php-disable-and-enabling-a-link/#findComment-1245188 Share on other sites More sharing options...
kamal213 Posted July 20, 2011 Author Share Posted July 20, 2011 Thanks guys for your all you help. Am just reading through the link AyKay47 - and your right there are some cool stuff which will help. Thanks for you help - that should be problems solved now!!! Quote Link to comment https://forums.phpfreaks.com/topic/242434-php-disable-and-enabling-a-link/#findComment-1245198 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.