sandbudd Posted August 11, 2011 Share Posted August 11, 2011 Hey guys I am trying to add title tags to a link... something like title="$something then more information"; but can't get it to work. Here is the working code without the title attribute. Any help would be great <?php if(empty($row_Recordset1['fb'])){ //empty() returned true : so there is nothing echo 'FB'; }else{ //empty() returned false so it is NOT true that there is nothing //so we can print it out: echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb'] . '\');" class="style3">FB</a>'; } ?> Quote Link to comment Share on other sites More sharing options...
requinix Posted August 11, 2011 Share Posted August 11, 2011 $something = "something"; echo 'FB'; Is there more to what you want than just that? Quote Link to comment Share on other sites More sharing options...
sandbudd Posted August 11, 2011 Author Share Posted August 11, 2011 the $something is pulling from the database it would actually be $high_school what you suggested display $something Quote Link to comment Share on other sites More sharing options...
sandbudd Posted August 11, 2011 Author Share Posted August 11, 2011 Okay this works and displays correctly the next question is I want to add onto the title statement with some copy example $row_Recordset1['high_school'] then add something else.... Here is the code that works so far <?php if(empty($row_Recordset1['fb'])){ //empty() returned true : so there is nothing echo 'FB'; }else{ //empty() returned false so it is NOT true that there is nothing //so we can print it out: echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb'] . '\'" title="' . $row_Recordset1['high_school'] . '");" class="style3" >FB</a>'; } ?> Quote Link to comment Share on other sites More sharing options...
sandbudd Posted August 11, 2011 Author Share Posted August 11, 2011 Never mind I got it...long day <?php if(empty($row_Recordset1['fb'])){ //empty() returned true : so there is nothing echo 'FB'; }else{ //empty() returned false so it is NOT true that there is nothing //so we can print it out: echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb'] . '\'" title="' . $row_Recordset1['high_school'] . 'whats up");" class="style3" >FB</a>'; } ?> Quote Link to comment Share on other sites More sharing options...
sandbudd Posted August 11, 2011 Author Share Posted August 11, 2011 will thought I had it but now the popup function does not work argh... <?php if(empty($row_Recordset1['fb'])){ //empty() returned true : so there is nothing echo 'FB'; }else{ //empty() returned false so it is NOT true that there is nothing //so we can print it out: echo '<a href="javascript://" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb'] . '\'" title="' . $row_Recordset1['high_school'] . ' Football Schedule");" class="style3" >FB</a>'; } ?> Quote Link to comment Share on other sites More sharing options...
sandbudd Posted August 11, 2011 Author Share Posted August 11, 2011 just had to swap them around this works and thanks again for the help <?php if(empty($row_Recordset1['fb'])){ //empty() returned true : so there is nothing echo 'FB'; }else{ //empty() returned false so it is NOT true that there is nothing //so we can print it out: echo '<a href="javascript://" " title="' . $row_Recordset1['high_school'] . ' Football Schedule" onClick="popupfunction(\'/highschool/schedules/' . $row_Recordset1['fb'] . '\');" class="style3" >FB</a>'; } Quote Link to comment 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.