Jump to content

burnside

Members
  • Posts

    541
  • Joined

  • Last visited

Posts posted by burnside

  1. [quote author=Daniel0 link=topic=105646.msg878687#msg878687 date=1209589239]
    [quote author=448191 link=topic=105646.msg878654#msg878654 date=1209586220]
    [quote author=neylitalo link=topic=105646.msg878591#msg878591 date=1209580775]
    947740, read the thread first. Thanks.
    [/quote]

    Yeah, and what's up with using 6 digits for a username? Lame...

    <balloon snap/>
    [/quote]

    Damn, now I can't refer to you as [tt]^\d{6}$[/tt] anymore... :(
    [/quote]

    I dont understand sorry :(
  2. code : i have been looking around on the forum and found this.

     

    
    <script language="javascript">
    
    // Replaces the currently selected text with the passed text.
    function replaceText(text, textarea)
    {
    // Attempt to create a text range (IE).
    if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
    {
    	var caretPos = textarea.caretPos;
    
    	caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
    	caretPos.select();
    }
    // Mozilla text range replace.
    else if (typeof(textarea.selectionStart) != "undefined")
    {
    	var begin = textarea.value.substr(0, textarea.selectionStart);
    	var end = textarea.value.substr(textarea.selectionEnd);
    	var scrollPos = textarea.scrollTop;
    
    	textarea.value = begin + text + end;
    
    	if (textarea.setSelectionRange)
    	{
    		textarea.focus();
    		textarea.setSelectionRange(begin.length + text.length, begin.length + text.length);
    	}
    	textarea.scrollTop = scrollPos;
    }
    // Just put it on the end.
    else
    {
    	textarea.value += text;
    	textarea.focus(textarea.value.length - 1);
    }
    }
    
    
    // Remember the current position.
    function storeCaret(text)
    {
    // Only bother if it will be useful.
    if (typeof(text.createTextRange) != "undefined")
    	text.caretPos = document.selection.createRange().duplicate();
    }
    
    
    // Surrounds the selected text with text1 and text2.
    function surroundText(text1, text2, textarea)
    {
    // Can a text range be created?
    if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
    {
    	var caretPos = textarea.caretPos, temp_length = caretPos.text.length;
    
    	caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text1 + caretPos.text + text2 + ' ' : text1 + caretPos.text + text2;
    
    	if (temp_length == 0)
    	{
    		caretPos.moveStart("character", -text2.length);
    		caretPos.moveEnd("character", -text2.length);
    		caretPos.select();
    	}
    	else
    		textarea.focus(caretPos);
    }
    // Mozilla text range wrap.
    else if (typeof(textarea.selectionStart) != "undefined")
    {
    	var begin = textarea.value.substr(0, textarea.selectionStart);
    	var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart);
    	var end = textarea.value.substr(textarea.selectionEnd);
    	var newCursorPos = textarea.selectionStart;
    	var scrollPos = textarea.scrollTop;
    
    	textarea.value = begin + text1 + selection + text2 + end;
    
    	if (textarea.setSelectionRange)
    	{
    		if (selection.length == 0)
    			textarea.setSelectionRange(newCursorPos + text1.length, newCursorPos + text1.length);
    		else
    			textarea.setSelectionRange(newCursorPos, newCursorPos + text1.length + selection.length + text2.length);
    		textarea.focus();
    	}
    	textarea.scrollTop = scrollPos;
    }
    // Just put them on the end, then.
    else
    {
    	textarea.value += text1 + text2;
    	textarea.focus(textarea.value.length - 1);
    }
    }
    
    window.onload=function() {
    // Event Used To Ready IE For Caret Position Storage
    document.postmodify.message.focus();
    }
    </script>
    
    

     

    This is the form for the buttons.

     

    
    <form>		
    	<input type=\"button\" onclick=\"surroundText('[b]', '[/b]', document.forms.postmodify.message); return false;\" value=\"Bold\">
    	<input type=\"button\" onclick=\"surroundText('[u]', '[/u]', document.forms.postmodify.message); return false;\" value=\"Underline\">
    	</form>
    
    

     

    This is the code for images like the clcikable faces etc ...

     

    <form>		
    	<a href=\"javascript:void(0);\" onclick=\"replaceText('', document.forms.postmodify.message); return false;\">LOCATION OF IMAGE HERE</a>
    			</form>
    
    

     

    And this is the text area

     

    
    <form action=yoursite method=POST name=postmodify>
    	<center>
    
    		<textarea cols=\"58\" rows=\"3\" name=\"message\" id=\"message\" onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\" onchange=\"storeCaret(this);\" onfocus=\"storeCaret(this);\" /></textarea> 
    

     

    Like i said this inst my own work, so there maybe errors etc ... sorry best i could do.

  3. just looking through your code there several errors i can see,

     

    biggest being you have deffined :

    $Mail = $_POST['Mail'];

     

    But in your insert code you have :

     

    $Mail_Addresses,

     

    So change either one and it should work.

  4. Hey : Try sumit like this.

     

    <?php 
                        // other script stuff
    
    if($_GET['User_ID']) 
    {
                $User_ID = $_GET['User_Id'];
                $sql = ""DELETE FROM itsupport WHERE User_ID='{$User_ID}'";  
                mysql_query($sql) or die('error');
    		echo " deleted";
    } 
    
    
    
    

     

    I used a small d in ID try with a uppercase D see if makes a diff

  5. Hey : Try sumit like this.

     

    <?php 
                        // other script stuff
    
    if($_GET['User_ID']) 
    {
                $User_ID = $_GET['User_Id'];
                $sql = ""DELETE FROM itsupport WHERE User_ID='{$User_ID}'";  
                mysql_query($sql) or die('error');
    		echo " deleted";
    } 
    
    
    
    

  6.  

    Sweet  ;D

     

    Now I won't second-guess myself when I have to use a quote.

     

    TEST POST FOR QUOTES

     

    A.K.A a post count increaser?

     

    Ha nope i couldnt see the diffrence so i thought must be on new posts, Till i refreshed the page sorry. And deleted my Temp Files, Cookies Etc ... ... So i am sorry if it seemed like a post count increase.

  7. Hey i have a VERY simple script to check if a username all ready taken :

     if($_GET['action'] == "personel" )
    			{
    
    			$username = $_POST['username'];
    			$check1 = mysql_query("SELECT username FROM members WHERE username='$username'");
    
    	 if ((mysql_num_rows($check1) != 0)) {
    			echo 'Sorry, Name already in use<br>';
    			 }
     else {
     $updateuserdb = mysql_query("update members set username='$username'  where id=$info[id]");
    echo "You have changed your username. You need to relogin please.<br>";
     }
    }
    

    it works fine, Problem is i want to add a few more details like email address etc .... all i want to know is there away if they dont change there username it wont display the name all ready taken error.?

     

    Sorry if i havent explaned this very well.

×
×
  • 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.