Activity Stream
48,167 MEMBERS
62153 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1.     
    #1
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

    Default PHP > HTML Replacement

    can any1 plz tell me how 2 do the html replacement? i googled it and came cross the: strip_tags( blah ) function but i dunt thinkz it'll work.

    for this;

    PHP Code: 
    echo "        <p class='select_text' align='center'><b>URL:</b> <input tabindex='1' value='[IMG]$siteURL/$uploadDir/$name[IMG]' onclick='this.focus();this.select();' size='65' /></p>"
    Chris2k Reviewed by Chris2k on . PHP > HTML Replacement can any1 plz tell me how 2 do the html replacement? i googled it and came cross the: strip_tags( blah ) function but i dunt thinkz it'll work. for this; echo " <p class='select_text' align='center'><b>URL:</b> <input tabindex='1' value='$siteURL/$uploadDir/$name' onclick='this.focus();this.select();' size='65' /></p>"; Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Do you mean to change the web address output or am I reading this wrong?

  4.     
    #3
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Please explain it a bit more...

    Defendos BETA3 Released! Thread - Official Website

  5.     
    #4
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    No need to use strip_tags as that will remove the html code too

    Solution
    As you included other variables which outputting, you need to use:

    "{" and "}" before and after the variable respectively

    So your new PHP Code:

    PHP Code: 
    echo "        <p class='select_text' align='center'><b>URL:</b> <input tabindex='1' value='[IMG]{$siteURL}/{$uploadDir}/{$name}[/IMG]' onclick='this.focus();this.select();' size='65' /></p>"
    My whole code:

    PHP Code: 
    <?php
    $siteURL 
    "http://localhost.com";
    $uploadDir "uploads";
    $name "filename.png";
    echo 
    "        <p class='select_text' align='center'><b>URL:</b> <input tabindex='1' value='[IMG]{$siteURL}/{$uploadDir}/{$name}[/IMG]' onclick='this.focus();this.select();' size='65' /></p>";  
    ?>

  6.     
    #5
    Member
    Website's:
    Elite.SO Defendos.com Motionite.com
    Euhm, did you fixed it? If yes where is the thankyou?

    Defendos BETA3 Released! Thread - Official Website

  7.     
    #6
    Member
    Website's:
    aquickhost.com
    I dont quite get what u are looking for.. u want php to replace ur html on user input?

  8.     
    #7
    Banned
    Website's:
    Seecure.me
    Use ermm.
    preg match, preg replace? or str replace or someshit.

  9.     
    #8
    It begins...
    You're gonna have to explain what it is that you are trying to do. Only then can we assist you with it @OP

  10.     
    #9
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    ^^^^^^

    He wants to actually just output the code in this form:



    he wont be able to direct output the variables

    There he would have to use { and } before outputting it

    Edit: Thats only what i see the problem in the code else you need to describe more

  11.     
    #10
    It begins...
    Or he could simply wrap the code with variables in double quotes instead of single quotes.

    OR, he could close single quotes where he encounters variables and re-open them later.

    { and } is not the only solution (assuming that's what he wants to do)

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. replacement for Lulzimg
    By manthing in forum Webmaster Discussion
    Replies: 20
    Last Post: 3rd Aug 2012, 01:29 AM
  2. WP o Matic Replacement ?
    By _brazzO in forum Wordpress
    Replies: 4
    Last Post: 27th Nov 2011, 05:42 AM
  3. ScreenSnapr Replacement ?
    By DLow in forum General Discussion
    Replies: 5
    Last Post: 25th Sep 2011, 03:50 PM
  4. Free Online Photoshop Replacement
    By Jesse in forum Useful Sites
    Replies: 3
    Last Post: 7th Apr 2011, 09:14 PM
  5. Replacement of Epassporte for Affiliates
    By ad33l in forum Webmasters, Money Making
    Replies: 20
    Last Post: 30th Oct 2010, 09:01 AM

Tags for this Thread

BE SOCIAL