Jump to content

How can i use [] tags instead of <> tags for profiles??


DarrenReeder

Recommended Posts

On my site im making ive made it so u can register, login and u have a profile which u can update..

 

http://90.202.46.253

 

thats the site, if u go on there, regsiter and login u will see that u can then 'edit my profile' then u update it and view ur page and its updated..but i was playing around with it earlier and found a few bugs with it and i think the HTML tags to use in profile mess about with things (when u originaly regsiter Tags are removed from ur inputed text before its entered to the database)

 

I need to know how i can make it so, were u wuld originally use <b>test</b> u cna use test so then it wont mess about with ur script...

 

ALSO

------

id like to know how i can make it so wen u register, u HAVE to put a real email (sumin@sumin.sumin) because at the moment u can just put '123' as email adress

Link to comment
Share on other sites

Ex:

 

$text = '[b]Test[/b]';
$text = preg_replace('~\[b\](.*?)\[\/b\]~i', "<b>$1</b>", $text);
echo $text; // <b>Test</b>

 

Woudlnt this leave me with the same problem..because before i think the main problem was with the fact that the " " was desturbing the script and it caused some problems....

 

hmmm, this BBcode seems a bit confusing, i cant find any tutorials on it anywre

Link to comment
Share on other sites

Woudlnt this leave me with the same problem..because before i think the main problem was with the fact that the " " was desturbing the script and it caused some problems....

 

You might want to describe to us what that actual problem is. Sounds like your not escaping your data properly before trying to place it within your database. Take a look at mysql_real_escape_string to see how easily this issue is solved.

Link to comment
Share on other sites

well, ill explain the process im going through...

 

I have a field in my database table called 'profile' and this is the info in ur profile page..

 

On the update profile page u have a from with a TextField and when u enter the data then press update, you go to the action page and then it puts whatever u had in the textfield into ur profile field on ur record..

 

now wen u go to ur profile it just displays all the info from your profile field onto the page with the Echo command like this:

 

echo "".  $profileinfo . ""

 

 

I want to make it so u use BB codes for this..That wuld be great if anyone can help me out

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.