Results 1 to 8 of 8

Thread: Use a php function in echo statement

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Use a php function in echo statement

    I've made this code, which disables a textbox if $TaxiDest has a value, however for my form to work i need this code to work [<?php phpfmg_hsc("field_17", ""); ?>] within the value tag of the textbox.

    Here is the code im working with:
    Code:
       
     <?php if($TaxiDest == "")
    	{echo "<input type='text' name='field_17' id='field_17' value='phpfmg_hsc('field_17', '');' class='text_box'>";}
    	else
    	{echo "<input type='text' name='field_17' id='field_17' disabled='disabled' value='$TaxiDest' class='text_box'>";}
    	?>
    by the way when i run the page [phpfmg_hsc(] is displayed in the textbox
    ive made a few changes but still not got it working heres a live link

    Thanks in advance,
    chris1990
    Last edited by chris1990; Mar 20th, 2012 at 11:01 AM.
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width