Jump to content

liam1412

Members
  • Posts

    170
  • Joined

  • Last visited

    Never

Everything posted by liam1412

  1. I have a table that users can only have 5 records in. What query do I use to find out which is the oldest and delete if they try to insert more. Baring in mind my table had no date column and has no reason to so I want to just do it based on the primary key which is car_id.
  2. I have just notcied a mistake in the code that isn't actually there in my proper code the line [code]if{$numrows != 10{[/code] does actually read as it should in my proper code. [code]if($numrows != 10){[/code]
  3. [quote]1  6 2  7 3  8 4  9 5  10 [/quote] This way - This is on completely different query to the one you answered ten mins ago for me. Ta
  4. I need to have 10 rows in one of my divs in order for the formating to remain in line.  If I query my database and there are only 7 results I want to echo 3 blank rows to pad it out. I have come up with this but it doesn't work. Can anyone tell me why. [code]<?php $query = "blah"; $result = mysql_query($query); $var1 = $result['field1']; $var2 = $result['field2']; $numrows = mysql_num_rows($result) ?> <table> <?php while($rows = mysql_fetch_array($result)){ ?> <tr> <td>$var1</td> <td>$var2</td> </tr> <?php if{$numrows != 10{ ?> <tr> <td><br /></td> <td><br /></td> </tr> <?php $numrows = ($numrows + 1); } } ?>[/code]
  5. Quicker than I thought. Yeah Thats what I meant.  Thanks peeps Liam  ;)
  6. Hello people. Would anybody be able to tell me how I can echo out a result set of 10 in to 2 rows of 5 etc.  Any help will be much appreciated. Thanks
  7. Sorry Im very new to CSS.  taken me a year to be pursuaded to come away from tables and formatting ha ha.  What other kinds of positioning are there and what are Block Elements do you mean <table> for example???????
  8. I have a box that the height will vary depending on what it queries from the database.  I want to place another box below but obviously the box will get covered up if the box above is too long.  How do I resolve so that the 2nd box will start 10 pixels below where the 1st box ends. Thanks
  9. It seems like a couple of posts out of my thread have gon?????? The problem I am now having is this My limit is set to 10.  There are 13 record in my query but the pagination reads. PREV 1 NEXT  None of them are links. Its acting like there are less than 10 records. GRRRRRRRRRRRRRRRRRRRR [code]<?php $limit = 10; $query_count = "SELECT count(*)FROM forum_answer WHERE ans_topic_id = $topic_id"; $result_count = mysql_query($query_count); $total_rows = mysql_num_rows($result_count); if(empty($page)){ $page = 1; } $limitvalue = $page * $limit - ($limit); $topic_query = "SELECT * FROM forum_answer WHERE ans_topic_id = $topic_id ORDER BY ans_id LIMIT $limitvalue, $limit"; $topic_result = mysql_query($topic_query)or die("Error: " . mysql_error()); while ($fetch_replies = mysql_fetch_array($topic_result)){ $ans_text = $fetch_replies['ans_text']; $ans_id = $fetch_replies['ans_id']; $ans_topic_id = $fetch_replies['ans_topic_id']; $ans_text = nl2br($ans_text); $ans_text = BBCODE($ans_text); ?> <tr>     <td valign="center" width="150" bgcolor="#565656"><p class="grey"> <?php echo $fetch_replies['ans_datetime'];?> <br /> <br /> <?php echo $fetch_replies['ans_poster_username'];?> <br /> <img src="images/profilepics/vw.jpg" width="50" height="50" border="2" /> </p></td>     <td valign="top" width="450" bgcolor="#6d6d6d"> <table width="450" cellspacing="0" cellpadding="0" border="0"> <tr>     <td colspan="2"><p class="grey"><?php echo $ans_text; ?></p></td> </tr> <tr>     <td width="350" align="right"></td>     <td width="100" align="right"> <br /> <br /> <br /> <br /> <?php if($fetch_replies['ans_poster_username'] == $_SESSION['username']){ ?> <a href="edit_reply.php?ans_id=<?php echo $ans_id ?>&ans_topic_id=<?php echo $ans_topic_id; ?>"><img src="images/edit_post.jpg" width="25" height="25" border="0" alt="Edit Reply" /></a>&nbsp;&nbsp;     <?php }; ?> </td> </tr> </table> </td> </tr> <?php } if($page != 1){ $pageprev = $page--; echo("<a href=\"$PHPSELF&page=$pageprev\">PREV</a> "); }else{ echo ("PREV"); $numofpages = $total_rows / $limit; for($i = 1; $i <= $numofpages; $i++){   if($i == $page){             echo($i." ");         }else             echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");          } } if(($total_rows % $limit) != 0){   if($i == $page){             echo($i." ");         }else{             echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");         } } if(($total_rows - ($limit * $page)) > 0){   $pagenext  = $page++;   echo("<a href=\"$PHP_SELF?page=$pagenext\">NEXT</a>"); }else{       echo("NEXT");    } if($no_of_views == 199){ $sql_hot_topic = "UPDATE forum_question SET topic_status = $topic_update WHERE topic_id = '$topic_id'"; mysql_query($sql_hot_topic)or die("unable to update topic status"); } $sql_update_topic_view = "UPDATE forum_question SET topic_view = '$topic_view' WHERE topic_id = '$topic_id'"; mysql_query($sql_update_topic_view)or die("failed to update topic_reply"); mysql_close(); ?> [/code]
  10. Someone please help. I have gone throuh this code over and over agin to no avail.  Its really winding me up now. Thanks
  11. Another Bump which im sorry for but I have followed the code exactly as it is in the tutorial on here and it isn't working. please can someone tell me what is wrong with it. Thanks
  12. I think it's acting as if there isn't any more records there but there is definatley. Here is my ammended code I have up to now. [code]<?php $limit = 20; $query_count = "SELECT count(*)FROM forum_question WHERE topic_forum_id = $forum_id"; $result_count = mysql_query($query_count); $total_rows = mysql_num_rows($result_count); if(empty($page)){ $page = 1; } $limitvalue = $page * $limit - ($limit); $topic_query = "SELECT * FROM forum_question WHERE topic_forum_id = $forum_id LIMIT $limitvalue, $limit"; $topic_result = mysql_query($topic_query)or die("Error: " . mysql_error()); while($topic_rows = mysql_fetch_array($topic_result)){ //loop table row while topic exists ?> <tr bgcolor="#6d6d6d"> <td width="60" align="center"> <?php if($topic_rows['topic_status'] == 1){ echo '<img src = "images/norm_post_locked.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 2){ echo '<img src = "images/norm_post_sticky.jpg" width="35" height="41" alt="Norm Topic" />';} elseif($topic_rows['topic_status'] == 3){ echo '<img src = "images/norm_post_locked_sticky.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 4){ echo '<img src = "images/hot_post.jpg" width="35" height="41" alt="Norm Topic" />';} elseif($topic_rows['topic_status'] == 5){ echo '<img src = "images/hot_post_locked.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 6){ echo '<img src = "images/hot_post_sticky.jpg" width="35" height="41" alt="Norm Topic" />';} elseif($topic_rows['topic_status'] == 7){ echo '<img src = "images/hot_post_locked_sticky.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 0){ echo '<img src = "images/norm_post.jpg" width="35" height="41" alt="Hot Topic" />';} ?> <td width="240"> <table width="240" cellspacing="0" cellpadding="0" border="0"> <tr>     <td><a href="view_topic.php?topic_id=<?php echo $topic_rows['topic_id'];?>"><?php echo $topic_rows['topic'];?></a></td> </tr> <tr>     <td align="right"> <?php if($_SESSION['user_level'] != 0){ ?> <br /> <a href='lock_thread.php?topic_id=".$topic_rows['topic_id']."'><img src='images/lock_thread.jpg' width="25" height="25" border="0" alt='Lock Thread' /></a>&nbsp;&nbsp <a href="make_sticky.php?topic_id=".$topic_rows['topic_id'].""><img src="images/make_sticky.jpg" width="25" height="25" border="0" alt="Make Sticky" /></a>&nbsp;&nbsp     <a href="delete_thread.php?topic_id=<?php echo $topic_rows['topic_id']; ?>"><img src="images/delete.jpg" width="25" height="25" border="0" alt="Delete Thread" /></a>&nbsp;&nbsp; <?php }; ?> </td> </tr> </table> </td>     <td width="100" align="center"><p class="grey"><?php echo $topic_rows['topic_starter_name'];?></p></td>     <td width="45" align="center"><p class="grey"><?php echo $topic_rows['topic_view'];?></p></td>     <td width="45" align="center"><p class="grey"><?php echo $topic_rows['topic_reply'];?></p></td>     <td width="110" align="left"><p class="lastpost"><b>Made By:&nbsp;&nbsp;</b><?php echo $topic_rows['last_post_by'];?><br /><b>On:&nbsp;</b><?php echo $topic_rows['last_post_date_time'];?></b></p></td> </tr> <?php } if($page != 1){ $pageprev = $page--; echo("<a href=\"$PHPSELF&page=$pageprev\">PREV</a> "); }else{ echo ("PREV"); $numofpages = $total_rows / $limit; for($i = 1; $i <= $numofpages; $i++){   if($i == $page){             echo($i." ");         }else             echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");          } } if(($total_rows % $limit) != 0){   if($i == $page){             echo($i." ");         }else{             echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");         } } if(($total_rows - ($limit * $page)) > 0){   $pagenext  = $page++;   echo("<a href=\"$PHP_SELF?page=$pagenext\">NEXT</a>"); }else{       echo("NEXT");    }    mysql_close(); ?> </table> <?php include 'footer.php';?> [/code]
  13. I have managed to resolve the first issue but now the Prev and Next links are not links and it isn't adding the page numbers in between the prev and next. I have my limit set at 20 When my forum as more than 20 topics the prev Next Link looks like this PREV 1 NEXT -- But none of them ar actually links Please help
  14. Hi I have tried a different method of pagination.  I am nw getting a parse error that points toward the last line of the code. i assume it's a semi-colon or curly bracket missing but can't find it.  Can anyone help, Thanks [code]<?php $limit = 20; $query_count = "SELECT count(*)FROM forum_question WHERE forum_id = $forum_id"; $result_count = mysql_query($query_count); $total_rows = mysql_num_rows($result_count); if(empty($page)){ $page = 1; } $limitvalue = $page * $limit - ($limit); $topic_query = "SELECT * FROM forum_question WHERE forum_id = $forum_id LIMIT $limitvalue, $limit"; $topic_result = mysql_query($topic_query)or die("Error: " . mysql_error()); while($topic_rows = mysql_fetch_array($topic_result)){ //loop table row while topic exists ?> <tr bgcolor="#6d6d6d"> <td width="60" align="center"> <?php if($topic_rows['topic_status'] == 1){ echo '<img src = "images/norm_post_locked.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 2){ echo '<img src = "images/norm_post_sticky.jpg" width="35" height="41" alt="Norm Topic" />';} elseif($topic_rows['topic_status'] == 3){ echo '<img src = "images/norm_post_locked_sticky.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 4){ echo '<img src = "images/hot_post.jpg" width="35" height="41" alt="Norm Topic" />';} elseif($topic_rows['topic_status'] == 5){ echo '<img src = "images/hot_post_locked.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 6){ echo '<img src = "images/hot_post_sticky.jpg" width="35" height="41" alt="Norm Topic" />';} elseif($topic_rows['topic_status'] == 7){ echo '<img src = "images/hot_post_locked_sticky.jpg" width="35" height="41" alt="Hot Topic" />';} elseif($topic_rows['topic_status'] == 0){ echo '<img src = "images/norm_post.jpg" width="35" height="41" alt="Hot Topic" />';} ?> <td width="240"> <table width="240" cellspacing="0" cellpadding="0" border="0"> <tr>     <td><a href="view_topic.php?topic_id=<?php echo $topic_rows['topic_id'];?>"><?php echo $topic_rows['topic'];?></a></td> </tr> <tr>     <td align="right"> <?php if($_SESSION['user_level'] != 0){ ?> <br /> <a href='lock_thread.php?topic_id=".$topic_rows['topic_id']."'><img src='images/lock_thread.jpg' width="25" height="25" border="0" alt='Lock Thread' /></a>&nbsp;&nbsp <a href="make_sticky.php?topic_id=".$topic_rows['topic_id'].""><img src="images/make_sticky.jpg" width="25" height="25" border="0" alt="Make Sticky" /></a>&nbsp;&nbsp     <a href="delete_thread.php?topic_id=<?php echo $topic_rows['topic_id']; ?>"><img src="images/delete.jpg" width="25" height="25" border="0" alt="Delete Thread" /></a>&nbsp;&nbsp; <?php }; ?> </td> </tr> </table> </td>     <td width="100" align="center"><p class="grey"><?php echo $topic_rows['topic_starter_name'];?></p></td>     <td width="45" align="center"><p class="grey"><?php echo $topic_rows['topic_view'];?></p></td>     <td width="45" align="center"><p class="grey"><?php echo $topic_rows['topic_reply'];?></p></td>     <td width="110" align="left"><p class="lastpost"><b>Made By:&nbsp;&nbsp;</b><?php echo $topic_rows['last_post_by'];?><br /><b>On:&nbsp;</b><?php echo $topic_rows['last_post_date_time'];?></b></p></td> </tr> <?php if($page != 1){ $pageprev = $page--; echo("<a href=\"$PHPSELF&page=$pageprev\">PREV" .$limit. "</a> "); }else{ echo ("PREV" .$limit. " "); $numofpages = $totalrows / $limit; for($i = 1; $i <= $numofpages; $i++){   if($i == $page){             echo($i." ");         }else{             echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");          } } if(($totalrows % $limit) != 0){   if($i == $page){             echo($i." ");         }else{             echo("<a href=\"$PHP_SELF&page=$i\">$i</a> ");         } } if(($totalrows - ($limit * $page)) > 0){   $pagenext  = $page++;   echo("<a href=\"$PHP_SELF?page=$pagenext\">NEXT".$limit."</a>"); }else{       echo("NEXT".$limit);    }  }    mysql_close(); ?> </table> <?php include 'footer.php';?>[/code]
  15. Sorry to bump but still need help wi this!!
  16. PS I know its spaghetti code but this is my first project with PHP  ;D
  17. Okay this is my entire page. I have found a couple of errors and edited I now have one error. Its saying that the index page is undefined on line 165 and then it is echoing ".$i." This i repeated 3 times as this is how many record it is retrieving. [code]<?php session_start(); include 'header.html'; $topic_id = $_GET['topic_id']; function BBCODE($bbcode) { //the bbcode tags.. $bbc_a=array( "[strike]", "[/strike]", "[b]", "[/b]", "[u]", "[/u]", "[big]", "[/big]", "[huge]", "[/huge]", "[e_mail]", "[/e_mail]", "[url]", "[/url]", "::smile::", "::mad::", "::sad::", "::rolleyes::", "::smirk::", "::wink::", "::surprised::", "::thinking::", "::tongue::", "::cool::", ); //bbcode gets converted to.. $bbc_b=array( "<strike>", "</strike>", "<b>", "</b>", "<u>", "</u>", "<font size=4>", "</font>", "<font size=8>", "</font>", "<a href=\"mailto:", "\">E-MAIL LINK</a>", "<a href=\"", "\" target=\"blank\">WEB LINK</a>", "<img src='images/smilies/smile.gif' />", "<img src='images/smilies/mad.gif' />", "<img src='images/smilies/sad.gif' />", "<img src='images/smilies/rolleyes.gif' />", "<img src='images/smilies/smirk.gif' />", "<img src='images/smilies/wink.gif' />", "<img src='images/smilies/surprised.gif' />", "<img src='images/smilies/thinking.gif' />", "<img src='images/smilies/tongue.gif' />", "<img src='images/smilies/cool.gif' />", ); $bbc_num=count($bbc_a); $loop=0; while($loop<$bbc_num) { $bbcode=str_replace($bbc_a[$loop], $bbc_b[$loop], $bbcode); $loop++; } return $bbcode; }  $host = 'localhost'; $db_username = 'root'; $db_password = ''; $db_name = 'klubdeutsch'; $table_name_topic = 'forum_question'; $table_name_answer = 'forum_answer'; $user_level = '1'; mysql_connect("$host" , "$db_username" , "$db_password")or die("Cannot Connect to Server"); mysql_select_db("$db_name")or die("Cannot connect to Databse"); $sql_topic_query = "SELECT * FROM forum_question WHERE topic_id = $topic_id"; $sql_get_topic = mysql_query($sql_topic_query); $sql_fetch_topic = mysql_fetch_array($sql_get_topic); $topic_id = $sql_fetch_topic['topic_id']; $topic = $sql_fetch_topic['topic']; $topic_text = $sql_fetch_topic['topic_text']; $topic_text = nl2br($topic_text); $topic_text = BBCODE($topic_text); $topic_start_datetime = $sql_fetch_topic['topic_start_datetime']; $topic_started_by = $sql_fetch_topic['topic_starter_name']; $topic_view = $sql_fetch_topic['topic_view']; $topic_view = ($topic_view + 1); $topic_reply = $sql_fetch_topic['topic_reply']; $sql_answer_query = "SELECT * FROM forum_answer WHERE ans_topic_id = '$topic_id' ORDER BY ans_id"; $sql_answer_result = mysql_query($sql_answer_query); $sql_no_posts_query = "SELECT * FROM forum_question WHERE topic_id = '$topic_id'"; $sql_no_posts_result = mysql_query($sql_no_posts_query); $no_posts_result = mysql_fetch_array($sql_no_posts_result); $no_of_posts = $no_posts_result['topic_reply']; $no_of_views = $no_posts_result['topic_view']; $topic_status = $no_posts_result['topic_status']; if($topic_status == 0){ $topic_update = 4;} elseif($topic_status == 1){ $topic_update = 5;} elseif($topic_status == 2){ $topic_update = 6;} elseif($topic_status == 3){ $topic_update = 7;} ?> <br /> <table align="center" width="600" cellspacing="2" cellpadding="0" border="0"> <tr>     <td width="500"><p class="header2"><?php echo $topic; ?></p></td> <td align="right" width="100"><a href="post_reply.php?topic_id=<?php echo $topic_id?>" onmouseover="chgImg('postreply','On')" onmouseout="chgImg('postreply','Off')"><img src="images/postreplyOff.jpg" width="100" border="0" name="postreply"></a></td> </tr> </table> <table class="border" align="center" width="600" cellspacing="2" cellpadding="3" border="0"> <tr>     <td valign="top" width="150" bgcolor="#565656"><p class="grey"> <?php echo $topic_start_datetime ?> <br /> <br /> <?php echo $topic_started_by ?><br /> <img src="images/profilepics/bmw.jpg" width="50" height="50" border="2" /> <br /> </td>     <td colspan="2" valign="top" width="450" bgcolor="#6d6d6d"> <table width="450" cellspacing="0" cellpadding="0" border="0"> <tr>     <td colspan="2"><p class="grey"><?php echo $topic_text; ?></p></td> </tr> <tr> <td width="410"><br /></td>     <td width="40" align="right"> <br /> <br /> <br /> <br /> <?php if($topic_started_by == $_SESSION['username']){ ?> <a href="edit_topic.php?topic_id=<?php echo $topic_id ?>"><img src="images/edit_post.jpg" width="25" height="25" border="0" alt="Edit Post" /></a>&nbsp;&nbsp;     <?php }; ?> </td> </tr> </table> </td> <?php while ($fetch_replies = mysql_fetch_array($sql_answer_result)){ if($_GET['page']) { $page = $_GET['page']; }else{ $page = 1; } $max = 20; $cur = (($page * $max) - $max); $total_rows = mysql_num_rows($sql_answer_result); $total_pages = ceil($total_rows / $max); for($i = 1; $i <= $total_pages; $i++) { if($page == $i) { echo '<b>".$i."</b>'; }else{ echo '<a href="?page='.$next.'">Next ></a>'; } } $ans_text = $fetch_replies['ans_text']; $ans_id = $fetch_replies['ans_id']; $ans_topic_id = $fetch_replies['ans_topic_id']; $ans_text = nl2br($ans_text); $ans_text = BBCODE($ans_text); ?> <tr>     <td valign="center" width="150" bgcolor="#565656"><p class="grey"> <?php echo $fetch_replies['ans_datetime'];?> <br /> <br /> <?php echo $fetch_replies['ans_poster_username'];?> <br /> <img src="images/profilepics/vw.jpg" width="50" heigth="50" border="2" /> </p></td>     <td valign="top" width="450" bgcolor="#6d6d6d"> <table width="450" cellspacing="0" cellpadding="0" border="0"> <tr>     <td colspan="2"><p class="grey"><?php echo $ans_text; ?></p></td> </tr> <tr>     <td width="350" align="right"></td>     <td width="100" align="right"> <br /> <br /> <br /> <br /> <?php if($fetch_replies['ans_poster_username'] == $_SESSION['username']){ ?> <a href="edit_reply.php?ans_id=<?php echo $ans_id ?>&ans_topic_id=<?php echo $ans_topic_id; ?>"><img src="images/edit_post.jpg" width="25" height="25" border="0" alt="Edit Reply" /></a>&nbsp;&nbsp;     <?php }; ?> </td> </tr> </table> </td> </tr> <?php } if($no_of_views == 199){ $sql_hot_topic = "UPDATE forum_question SET topic_status = $topic_update WHERE topic_id = '$topic_id'"; mysql_query($sql_hot_topic)or die("unable to update topic status"); } $sql_update_topic_view = "UPDATE forum_question SET topic_view = '$topic_view' WHERE topic_id = '$topic_id'"; mysql_query($sql_update_topic_view)or die("failed to update topic_reply"); mysql_close(); ?> [/code]
  18. Thanks but this is going to mean a lot of altering.  I wuld hope to gte mine working if at all possible. Thanks anyway Ted  ;D
  19. Hi I have tried to integrate pagination into my forum and its throwing back a whole load of undefined index errors etc. Please can you help This is what I have [code]while ($fetch_replies = mysql_fetch_array($sql_answer_result)){ if($_GET['page']) { $page = $_GET['page']; }else{ $page = 1; } $max = 20; $cur = (($page * $max) - $max); $total_rows = mysql_num_rows($sql_answer_result); $total_pages = ceil($total_rows / $max); for($i = 1; $i <= $total_pages; $i++) { if($page == $i) { echo '<b>".$i."</b>'; }else{ echo '<a href="?page='.$next.'">Next ></a>'; } } $ans_text = $fetch_replies['ans_text']; $ans_id = $fetch_replies['ans_id']; $ans_topic_id = $fetch_replies['ans_topic_id']; $ans_text = nl2br($ans_text); $ans_text = BBCODE($ans_text); ?> <tr>     <td valign="center" width="150" bgcolor="#565656"><p class="grey"> <?php echo $fetch_replies['ans_datetime'];?> <br /> <br /> <?php echo $fetch_replies['ans_poster_username'];?> <br /> <img src="images/profilepics/vw.jpg" width="50" heigth="50" border="2" /> </p></td>     <td valign="top" width="450" bgcolor="#6d6d6d"> <table width="450" cellspacing="0" cellpadding="0" border="0"> <tr>     <td colspan="2"><p class="grey"><?php echo $ans_text; ?></p></td> </tr> <tr>     <td width="350" align="right"></td>     <td width="100" align="right"> <br /> <br /> <br /> <br /> <?php if($fetch_replies['ans_poster_username'] == $_SESSION['username']){ ?> <a href="edit_reply.php?ans_id=<?php echo $ans_id ?>&ans_topic_id=<?php echo $ans_topic_id; ?>"><img src="images/edit_post.jpg" width="25" height="25" border="0" alt="Edit Reply" /></a>&nbsp;&nbsp;     <?php }; ?> </td> </tr> </table> </td> </tr>[/code]
  20. Nic one again. let me know a link I can attribute the source to.
  21. Look Im really sorry to bug you on this one again but I have added the code as you suggested.  Everything works fine except it is not picking up the tag variable ie The line in my code reads [code]<img src="images/smilies/link.jpg" onclick="AddTag('[url]')">&nbsp;&nbsp[/code] Now unless im mistaken this should print [url][/url] into the txt box. What it is actually printing is [tag][/tag] DO I need to make a different function for every different type of tag I use. Thanks
  22. My Mistake. All working now. You deserve a mention somewhere on my site. Not related to coding or owt but I think i will put javascript thanks to franklyn in there coz you don't give me that much help for nowt. let me know some link details etc and i'll get it added in for you. Ta
×
×
  • 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.