Jump to content

Lulzim

Members
  • Posts

    295
  • Joined

  • Last visited

Everything posted by Lulzim

  1. phpversion() function returns a string containing current php version <?echo 'Current PHP version is: ' . phpversion();?>
  2. Lulzim

    BBCode buttons

    forget the first one, this is betterhere is an example with 2 textareas <html><head><script type='text/javascript'>function addBB (text, target){ document.getElementById(target).value+=text;}</script></head><body><form action="somefile.php" id="form1"><input type='button' value='Italic' onclick="addBB('[i]ITALIC_TEXT[/i] ', 'txt');"><input type='button' value='bold' onclick="addBB('[b]BOLD_TEXT[/b] ', 'txt');"><input type='button' value='underline' onclick="addBB('[u]UNDERLINE_TEXT[/u] ', 'txt');"><input type='button' value='url' onclick="addBB('[url=URL_TO_GO_TO]TEXT_DISPLAYED[/url] ', 'txt');"><input type='button' value='color' onclick="addBB('[color=COLOR_YOU_WANT]COLORED_TEXT[/color] ', 'txt');"><input type='button' value='image' onclick="addBB('[img=IMAGE_PATH] ', 'txt');"><input type='button' value='align' onclick="addBB('[align=LEFT/RIGHT/CENTER]CONTENT_TO_BE_ALIGNED[/align] ', 'txt');"><br><textarea cols='80' rows='10' id='txt' name='txt'></textarea><br> <br><input type='button' value='Italic' onclick="addBB('[i]ITALIC_TEXT[/i] ', 'txt2');"><input type='button' value='bold' onclick="addBB('[b]BOLD_TEXT[/b] ', 'txt2');"><input type='button' value='underline' onclick="addBB('[u]UNDERLINE_TEXT[/u] ', 'txt2');"><input type='button' value='url' onclick="addBB('[url=URL_TO_GO_TO]TEXT_DISPLAYED[/url] ', 'txt2');"><input type='button' value='color' onclick="addBB('[color=COLOR_YOU_WANT]COLORED_TEXT[/color] ', 'txt2');"><input type='button' value='image' onclick="addBB('[img=IMAGE_PATH] ', 'txt2');"><input type='button' value='align' onclick="addBB('[align=LEFT/RIGHT/CENTER]CONTENT_TO_BE_ALIGNED[/align] ', 'txt2');"><br><textarea cols='80' rows='10' id='txt2' name='txt'></textarea><br><input type='submit' value='save'></form></body></html> when you call the addBB function, the first argument is the text which you want to add when button is clicked and the second argument is the target textarealike this:addBB('text_to_display', 'target_textarea')you can add as much textareas you want :)btw. this doesn't have anything to do with php, somebody move this thread to javascript forum
  3. Lulzim

    BBCode buttons

    for everyone, in each button you have to specify where the text will be added
  4. Lulzim

    BBCode buttons

    here is a very simple one <html><head></head><body><form action="somefile.php"><input type='button' value='Italic' onclick="txt.value+='[i]ITALIC_TEXT[/i] ';"><input type='button' value='bold' onclick="txt.value+='[b]BOLD_TEXT[/b] ';"><input type='button' value='underline' onclick="txt.value+='[u]UNDERLINE_TEXT[/u] ';"><input type='button' value='url' onclick="txt.value+='[url=URL_TO_GO_TO]TEXT_DISPLAYED[/url] ';"><input type='button' value='color' onclick="txt.value+='[color=COLOR_YOU_WANT]COLORED_TEXT[/color] ';"><input type='button' value='image' onclick="txt.value+='[img=IMAGE_PATH] ';"><input type='button' value='align' onclick="txt.value+='[align=LEFT/RIGHT/CENTER]CONTENT_TO_BE_ALIGNED[/align] ';"><br><textarea cols='100' rows='10' id='txt' name='txt'></textarea><br><input type='submit' value='save'></form></body></html>
  5. to upload use any simple upload script, you can find a lot on internet for viewing, use this tutorial on w3schoolshttp://www.w3schools.com/media/media_browservideos.asp
  6. you can also use these meta tags: <meta http-equiv="cache-control" content="no-cache"><meta http-equiv="pragma" content="no-cache">
  7. i have used this kind of advertisement on my we page before, but i didn't create a script myselfthere are a lot of advertisement websites/companies that offer these kind of services have a look at this site:http://www.vibrantmedia.com/webpublishers/index.aspeven the website that you provided in previous post uses this kind of advertisements
  8. this one works fine: <html><head><title>test page</title><script type='text/javascript'>function addText(){ var myArray = new Array("Sam","Pete"); document.getElementById("addTextHere").innerHTML += "Posted By "+myArray[0];}</script></head><body><input type='button' value='click me' onclick="addText();"><br><br><div id='addTextHere'>InnerHTML text goes here: </div></body></html>
  9. you changed the condition here from != to == : if ($row_RSsales['website'] == '') it should be like this: if ($row_RSsales['website'] != '')
×
×
  • Create New...