SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2012
    Location
    malaysia
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem regarding to display textfield in if else statement

    hello...i have problem to display text field...

    here is my code to display id and if there is no data in database, the text field will be display instead of id...i think there is something wrong with my code and i dunno what else to do after trying so many times..

    Code:
    <? if (!empty($capture1['id_radicare'])){
    echo '<input type="text" name="id_radicare" value="<?php echo $capture1['id_radicare']" />';
    } else {
    echo '<input style="text-transform: uppercase" name="id_radicare" type="text" id="id_radicare" size="30" maxlength="25"
                           value= "084/2012/"/>'; }?>

    i got error as below

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\star\radicare_tambah_daftar_tindakan.php on line 340

    anyone can take a look and help?

  2. #2
    SitePoint Member
    Join Date
    Jan 2012
    Location
    malaysia
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RESOLVED!


Bookmarks

Posting Permissions

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