dimanche 31 janvier 2016

how do i change the text inside a button using a php if else statement?

Im on a dynamic webpage written in php and would like to have an if else statement that would look inside mysql database table and check if the string "description" is present inside a certain database table column. if the word "description" is present echo "Visit Discounted Venue" text inside the button, else echo "Visit venue website" string inside the button.

I currently have the code below, its in a php file.

<?php 
  if(stripos( $forum_data['venue_url_text'],"discount") == false) ?>

" class="btn" target="_blank" rel="nofollow"> VISIT VENUE WEBSITE

" class="btn" target="_blank" rel="nofollow"> VISIT DISCOUNTED VENUE


Aucun commentaire:

Enregistrer un commentaire