Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

divdav

Members
  • Joined

  • Last visited

Everything posted by divdav

  1. Thanks for your reply but I do not want to use third party software. I was wanting to set it up so as I receive payment for an order, I can then fill in details on the wholesalers web page from my database fields without having to manually process the order. I have had advice on another forum that Pearl is the only option as it can not be done with PHP and MySQl but I thought I would just enquire here to see if anyone has had previous experience as it has been a helpful resource in the past.
  2. I am currently planning a development which will include taking orders through a site and then at the end of the day placing numerous orders to different suppliers. The problem I have is how to place the orders online once I have the required totals on a database. I want to be able to access the supplier order form automatically and update it with values from a database but I am unsure if this is possible. If anyone could give me some advice I would very much appreciate it. TIA!
  3. divdav posted a topic in Server Side
    I have been considering making a php form that will search a database to display results, the only problem is I want to have different option fields to appear depending on specific elementd selected from a drop down menu. So if an element is selected from the dropdown menu the form changes to suit that specific element. Can this be done purely through php?
  4. Yeah I am trying to pull scores directly from games as they are being played or just finished being played.
  5. No I don't have access to the servers. Although was hoping that there would be some way users could sign up with the required information to access any required data.
  6. I need to be able to get a website that can take scores straight from specific games from when the registered user plays the games. Is this possible?
  7. I am currently looking for someone to help develop parts of my website I am having created for online gaming. The trouble I am having is finding out what skills I should be looking for my candidate(s) to have. I need someone who can link my website with certain online games from PS3's, Xbox etc. But I don't have a clue how this may be done and therefor have no idea which skills to look out for. Could someone point me in the right direction?
  8. Thanks for the hepful reply Dizi, I think that could work for changing the link colour etc but not sure if that will prevent the link from being visited by other website visitors, thats the problematic part for me.
  9. I am trying to allow my site to have a selection of available links that will redirect to a corresponding webpage. I have a problem as I only want these links to be visited once, and once clicked I want to be able to change the link to a greyed out image and when clicked it doesn't respond in any way. Could anyone help me out please, I already have images etc and I know how to use the href in html to get the linked webpage it is just the visited part I am unsure of.
  10. Thanks for your replies guys, I am using images for the links, so I'll muck around with a few ideas tonight and see if I can get it to work out.
  11. I was wondering if anyone could give me some advice on how I could block off a link once it has been clicked on once. I have seen it done on other sites and was wondering how I could begin to use it.
  12. Got something sorted from help in another development forum. This part of this forum has really deminished in the past few months imo, use to be able to get helpful comments on anything straight away, now lucky to get more than 5 replies in a thread.
  13. Does anyone have any php code or know of a good tutorial where I can display the username of a user on a site page after they have loged in. Currently I am having the users re-type their usernames everytime they submit a contact form on my site but I want this to automatically be shown through an echo statement.
  14. I don't see a problem there myself. I had the script working with just a simple form at the bottom where the variables were replaced with plain html text, it worked fine but I want the first poster to be given different output than the proceeding posters. It was only when I introduced the variables $title and $secline that the problem occured. I naturally thought it was the form but after testing that it was nothing there so must be something that I am over looking regarding the new variables.
  15. The form is fine, I tested it this morning on a page of it's own. But I still get an error when trying to access the php file. The error I get is : Parse error: syntax error, unexpected $end in /home/compose.php on line 141 and my full code is : <?php require_once 'conn.php'; require_once 'functions.php'; require_once 'header.php'; $subject = ''; if (isset($_GET['topicid'])) { $topicid = $_GET['topicid']; } else { $topicid = ""; } if (isset($_GET['forumid'])) { $forumid = $_GET['forumid']; } else { $forumid = ""; } if (isset($_GET['reid'])) { $reid = $_GET['reid']; } $body = ''; $post = ''; $authorid = $_SESSION['user_id']; $edit_mode = FALSE; if (isset($_GET['a']) and $_GET['a'] == 'edit' and isset($_GET['post']) and $_GET['post']) { $edit_mode = TRUE; } require_once 'header.php'; if (!isset($_SESSION['user_id'])) { echo "<div class=\"notice\">" . "You must be logged in to post. Please <a href=\"" . "login.php\">Log in</a> before posting a message." . "</div>"; } elseif ($edit_mode and $_SESSION['user_id'] != $authorid) { echo "<div class=\"noauth\">" . "You are not authorized to edit this post. Please contact " . "your administrator.</div>"; } else { if ($edit_mode) { $sql = "SELECT * FROM forum_posts p, forum_forum f " . "WHERE p.id = " . $_GET['post'] . " AND p.forum_id = f.id"; $result = mysql_query($sql,$conn) or die('Could not retrieve post data; ' . mysql_error()); $row = mysql_fetch_array($result); $subject = $row['subject']; $topicid = $row['topic_id']; $forumid = $row['forum_id']; $body = $row['body']; $post = $_GET['post']; $authorid = $row['author_id']; } else { if ($topicid == "") { $topicid = 0; $topamt = 0; $topicname = "New Topic"; } else { $topamt = 1; if ($reid != "") { $sql = "SELECT subject FROM forum_posts WHERE id = " . $reid; $result = mysql_query($sql, $conn) or die('Could not retrieve topic; ' . mysql_error()); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $re = preg_replace("/(re: )/i","",$row['subject']); } } $sql = "SELECT subject FROM forum_posts WHERE id = "; $sql .= $topicid . " AND topic_id = 0 AND forum_id = $forumid"; $result = mysql_query($sql,$conn) or die('Could not retrieve topic; ' . mysql_error()); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_array($result); $topicname = "Reply to <em>" . $row['subject'] . "</em>\n"; $subject = ($re == ""?"":"Re: " . $re); } else { $topicname = "Reply"; $topicid = 0; } } } if ($forumid == "" or $forumid == 0) $forumid = 1; $sql = "SELECT forum_name FROM forum_forum " . "WHERE id = '" . $forumid . "'"; $result = mysql_query($sql, $conn) or die('Could not retrieve forum name; ' . mysql_error()); $row = mysql_fetch_array($result); $forumname = $row['forum_name']; if($topamt == 0) { $title = "Title of offer"; $secline = "Description"; }else { $title = "Title"; $secline = "Reply"; } ?> <form id="forumpost" method="post" action="transact-post.php"> <h3><?php echo $edit_mode ?"Edit Post" :"$forumname: $topicname"; ?> </h3> <p> <?php echo $title; ?> <br> <input type="text" class="subject" name="subject" maxlength="255" value="<?php echo $subject; ?>"> </p> <p> <?php echo $secline; ?> <br> <textarea class="body" name="body" rows="10" cols="60"><?php echo $body; ?></textarea> </p> <p> <?php if ($edit_mode) { echo '<input type="submit" class="submit" name="action" ' . "value=\"Save Changes\">\n"; } else { echo '<input type="submit" class="submit" name="action" ' . "value=\"Submit New Post\">\n"; ?> </p> <?php echo "<input type=\"hidden\" name=\"post\" " . "value=\"$post\">\n"; echo "<input type=\"hidden\" name=\"topic_id\" " . "value=\"$topicid\">\n"; echo "<input type=\"hidden\" name=\"forum_id\" " . "value=\"$forumid\">\n"; echo "<input type=\"hidden\" name=\"author_id\" " . "value=\"$authorid\">\n"; echo "</form>\n"; } require_once 'footer.php'; ?> Any ideas whats wrong there?
  16. I appreciate your input but I had only put up the form part of the code the declaring of variables is done before this in the code, thanks anyway.
  17. Trying to pass variables into a form and having some probs, thought this would work : <form id="forumpost" method="post" action="transact-post.php"> <h3><?php echo $edit_mode ?"Edit Post" :"$forumname: $topicname"; ?> </h3> <p> <?php echo $title; ?> <br> <input type="text" class="subject" name="subject" maxlength="255" value="<?php echo $subject; ?>"> </p> <p> <?php echo $secline; ?> <br> <textarea class="body" name="body" rows="10" cols="60"><?php echo $body; ?></textarea> </p> <p> But having trouble getting it to work, any opinions?
  18. Thanks for perciviring with this mate, I managed to get one of the boys at work to sort it. It's alot easier when it's right there in front of you. Thanks again.
  19. Just gives the exact same eroor message I'm affraid.
  20. Ill put up the full codes and see if there's something I am missing but I really don't think I am. The address bar looks like this : http://www.mywebsite.com/viewforum.php?f=1 Giving Error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod FROM forum_forum WHERE id = 1' at line 1 SELECT forum_name as name, forum_desc as description, forum_moderator as mod FROM forum_forum WHERE id = 1 viewforum.php looks like : <?php require_once ‘conn.php’; require_once ‘functions.php’; require_once ‘http.php’; if (!isset($_GET[‘f’])) redirect(‘index.php’); require_once ‘header.php’; $forumid = $_GET[‘f’]; $forum = getForum($forumid); echo breadcrumb($forumid, “F”); if (isset($_GET[‘page’])) { $page = $_GET[‘page’]; } else { $page = 1; } $limit = $admin[‘pageLimit’][‘value’]; if ($limit == “”) $limit = 25; $start = ($page - 1) * $admin[‘pageLimit’][‘value’]; $sql = “CREATE TEMPORARY TABLE tmp ( “ . “topic_id INT(11) NOT NULL DEFAULT 0, “ . “postdate datetime NOT NULL default ‘0000-00-00 00:00:00’)”; mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $sql = “LOCK TABLES forum_users READ,forum_posts READ”; mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $sql = “INSERT INTO tmp SELECT topic_id, MAX(date_posted) “ . “FROM forum_posts “ . “WHERE forum_id = $forumid “ . “AND topic_id > 0 “ . “GROUP BY topic_id”; mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $sql = “UNLOCK TABLES”; mysql_query($sql) or die(mysql_error().”<br>”.$sql); //die(‘stop’); $sql = “SELECT SQL_CALC_FOUND_ROWS “ . “t.id as topic_id, t.subject as t_subject, “ . “u.name as t_author, count(p.id) as numreplies, “ . “t.date_posted as t_posted, tmp.postdate as re_posted “ . “FROM forum_users u “ . “JOIN forum_posts t “ . “ON t.author_id = u.id “ . “LEFT JOIN tmp “ . “ON t.id = tmp.topic_id “ . “LEFT JOIN forum_posts p “ . “ON p.topic_id = t.id “ . “WHERE t.forum_id = $forumid “ . “AND t.topic_id = 0 “ . “GROUP BY t.id “ . “ORDER BY re_posted DESC “ . “LIMIT $start, $limit”; $result = mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $numrows = mysql_num_rows($result); if ($numrows == 0) { $msg = “There are currently no posts. Would you “ . “like to be the first person to create a thread?”; $title = “Welcome to “ . $forum[‘name’]; $dest = “compose.php?forumid=” . $forumid; $sev = “Info”; $message = msgBox($msg,$title,$dest,$sev); echo $message; } else { if (isset($_SESSION[‘user_id’])) { echo topicReplyBar(0, $_GET[‘f’], “right”); } echo “<table class=\”forumtable\” cellspacing=\”0\” “; echo “cellpadding=\”2\”><tr>”; echo “<th class=\”thread\”>Thread</th>”; echo “<th class=\”author\”>Author</th>”; echo “<th class=\”replies\”>Replies</th>”; echo “<th class=\”lastpost\”>Last Post</th>”; echo “</tr>”; $rowclass = “”; while ($row = mysql_fetch_array($result)) { $rowclass = ($rowclass == “row1”?”row2”:”row1”); if ($row[‘re_posted’] == “”) { $lastpost = $row[‘t_posted’]; } else { $lastpost = $row[‘re_posted’]; } if ((isset($_SESSION[‘user_id’])) and ($_SESSION[‘last_login’] < $lastpost)) { $newpost = true; } else { $newpost = false; } echo “<tr class=\”$rowclass\”>”; echo “<td class=\”thread\”>” . ($newpost?NEWPOST.” ”:””); echo “<a href=\”viewtopic.php?t=”; echo $row[‘topic_id’] . “\”>” . $row[‘t_subject’] . “</a></td>”; echo “<td class=\”author\”>” . $row[‘t_author’] . “</td>”; echo “<td class=\”replies\”>” . $row[‘numreplies’] . “</td>”; echo “<td class=\”lastpost\”>” . $lastpost . “</td>”; echo “</tr>\n”; } echo “</table>”; echo paginate($limit); echo “<p>” . NEWPOST . “ = New Post(s)</p>”; } $sql = “DROP TABLE tmp”; mysql_query($sql) or die(mysql_error().”<br>”.$sql); require_once ‘footer.php’; ?> And function.php looks like : <?php function trimBody($theText, $lmt=100, $s_chr=”@@@”, $s_cnt=1) { $pos = 0; $trimmed = FALSE; for ($i = 1; $i <= $s_cnt; $i++) { if ($tmp = strpos($theText, $s_chr, $pos)) { $pos = $tmp; $trimmed = TRUE; } else { $pos = strlen($theText); $trimmed = FALSE; break; } } $theText = substr($theText, 0, $pos); if (strlen($theText) > $lmt) { $theText = substr($theText, 0, $lmt); $theText = substr($theText, 0, strrpos($theText,’ ‘)); $trimmed = TRUE; } if ($trimmed) $theText .= ‘...’; return $theText; } function msgBox($m, $t, $d=”index.php”, $s=”Info”) { $theMsg = “<div id=\”requestConfirm” . $s . “\”>”; $theMsg .= “<h2>” . $t . “</h2>\n”; $theMsg .= “<p>” . $m . “</p>”; $theMsg .= “<p><a href=\”” . $d . “\” “; $theMsg .= “class=\”buttonlink\”>”; $theMsg .= “Yes</a>”; $theMsg .= “<a href=\”index.php\” class=\”buttonlink\”>”; $theMsg .= “No</a></p>”; $theMsg .= “</div>”; return $theMsg; } function getForum($id) { $sql = "SELECT `forum_name` as name, `forum_desc` as description, `forum_moderator` as formod FROM `forum_forum` WHERE `id` = '$id'"; $result = mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $row = mysql_fetch_array($result); return $row; } function getForumID($topicid) { $sql = “SELECT forum_id FROM forum_posts WHERE id=$topicid”; $result = mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $row = mysql_fetch_array($result); return $row[‘forum_id’]; } function breadcrumb($id, $getfrom=”F”) { $sep = “<span class=\”bcsep\”>”; $sep .= “ · “; $sep .= “</span>”; if ($getfrom == “P”) { $sql = “SELECT forum_id, subject FROM forum_posts “ . “WHERE id = “ . $id; $result = mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $row = mysql_fetch_array($result); $id = $row[‘forum_id’]; $topic = $row[‘subject’]; } $row = getForum($id); $bc = “<a href=\”index.php\”>Home</a>$sep”; switch ($getfrom) { case “P”: $bc .= “<a href=\”viewforum.php?f=$id\”>”.$row[‘name’] . “</a>$sep” . $topic; break; case “F”: $bc .= $row[‘name’]; break; } return “<h4 class=\”breadcrumb\”>” . $bc . “</h4>”; } function showTopic($topicid, $showfull=TRUE) { global $conn; global $userid; global $limit; echo breadcrumb($topicid, “P”); if (isset($_GET[‘page’])) { $page = $_GET[‘page’]; } else { $page = 1; } if ($limit == “”) $limit = 25; $start = ($page - 1) * $limit; if (isset($_SESSION[‘user_id’])) { echo topicReplyBar($topicid, getForumID($topicid), “right”); } $sql = “SELECT SQL_CALC_FOUND_ROWS “. “p.id, p.subject, p.body, p.date_posted, “ . “p.date_updated, u.name as author, u.id as author_id, “ . “u.signature as sig, c.count as postcount, “ . “p.forum_id as forum_id, f.forum_moderator as formod, “ . “p.update_id, u2.name as updated_by “ . “FROM forum_forum f “ . “JOIN forum_posts p “ . “ON f.id = p.forum_id “ . “JOIN forum_users u “ . “ON u.id = p.author_id “ . “LEFT JOIN forum_users u2 “ . “ON u2.id = p.update_id “ . “LEFT JOIN forum_postcount c “ . “ON u.id = c.user_id “ . “WHERE (p.topic_id = $topicid OR p.id = $topicid) “ . “ORDER BY p.topic_id, p.date_posted “. “LIMIT $start,$limit”; $result = mysql_query($sql, $conn) or die(mysql_error() . “<br>” . $sql); $pagelinks = paginate($limit); if (mysql_num_rows($result) == 0) { $msg = “There are currently no posts. Would you “ . “like to be the first person to create a thread?”; $title = “No Posts...”; $dest = “compose.php?forumid=” . $forumid; $sev = “Info”; $message = msgBox($msg,$title,$dest,$sev); echo $message; } else { echo “<table class=\”forumtable\” cellspacing=\”0\” “; echo “cellpadding=\”2\”><tr>”; echo “<th class=\”author\”>Author</th>”; echo “<th class=\”post\”>Post</th>”; echo “</tr>”; $rowclass = “”; while ($row = mysql_fetch_array($result)) { $lastupdate = “”; $editlink = “”; $dellink = “”; $replylink = “ ”; $pcount = “”; $pdate = “”; $sig = “”; if ($showfull) { $body = $row[‘body’]; if (isset($_SESSION[‘user_id’])) { $replylink = “<a href=\”compose.php?forumid=” . $row[‘forum_id’] . “&topicid=$topicid&reid=” . $row[‘id’] . “\” class=\”buttonlink\”>REPLY</a> ”; } else { $replylink = “”; } if ($row[‘update_id’] > 0) { $lastupdate = “<p class=\”smallNote\”>Last updated: “ . $row[‘date_updated’] . “ by “ . $row[‘updated_by’] . “</p>”; } if (($userid == $row[‘author_id’]) or ($userid == $row[‘mod’]) or ($_SESSION[‘access_lvl’] > 2)) { $editlink = “<a href=\”compose.php?a=edit&post=”.$row[‘id’]. “\” class=\”buttonlink\”>EDIT</a> ”; $dellink = “<a href=\”transact-affirm.php?action=deletepost&”. “id=” . $row[‘id’] . “\” class=\”buttonlink\”>DELETE</a> ”; } $pcount = “<br><span class=\”textsmall\”>Posts: “ . ($row[‘postcount’]==””?”0”:$row[‘postcount’]) . “</span>”; $pdate = $row[‘date_posted’]; $sig = ($row[‘sig’] != “”?”<p class=\”sig\”>”. bbcode(nl2br($row[‘sig’])):””).”</p>”; } else { $body = trimBody($body); } $rowclass = ($rowclass == “row1”?”row2”:”row1”); echo “<tr class=\”$rowclass\”>”; echo “<td class=\”author\”>” . $row[‘author’]; echo $pcount; echo “</td><td class=\”post\”><p>”; if (isset($_SESSION[‘user_id’]) and ($_SESSION[‘last_login’] < $row[‘date_posted’])) { echo NEWPOST . “ “; } if (isset($_GET[‘page’])) { $pagelink = “&page=” . $_GET[‘page’]; } else { $pagelink = “”; } echo “<a name=\”post” . $row[‘id’] . “\” href=\”viewtopic.php?t=” . $topicid .$pagelink .”#post”. $row[‘id’] . “\”>”.POSTLINK.”</a>”; if (isset($row[‘subject’])) { echo “ <strong>” . $row[‘subject’] . “</strong>”; } echo “</p><p>” . bbcode(nl2br(htmlspecialchars($body))) . “</p>”; echo $sig; echo $lastupdate; echo “</td></tr>”; echo “<tr class=\”$rowclass\”><td class=\”authorfooter\”>”; echo $pdate . “</td><td class=\”threadfooter\”>”; echo $replylink; echo $editlink; echo $dellink; echo “</td></tr>\n”; } echo “</table>”; echo $pagelinks; echo “<p>”.NEWPOST.” = New Post ”; echo POSTLINK.” = Post link (use to bookmark)</p>”; } } function isParent($page) { $currentpage = $_SERVER[‘PHP_SELF’]; if (strpos($currentpage, $page) === false) { return FALSE; } else { return TRUE; } } function topicReplyBar($topicid,$forumid,$pos=”right”) { $html = “<p class=\”buttonBar” . $pos . “\”>”; if ($topicid > 0) { $html .= “<a href=\”compose.php?forumid=$forumid” . “&topicid=$topicid&reid=$topicid\” “ . “class=\”buttonlink\”>Reply to Thread</a>”; } if ($forumid > 0) { $html .= “<a href=\”compose.php?forumid=$forumid\” “ . “class=\”buttonlink\”>New Thread</a>”; } $html .= “</p>”; return $html; } function userOptionList($level) { $sql = “SELECT id, name, access_lvl “ . “FROM forum_users “ . “WHERE access_lvl=” . $level . “ “ . “ORDER BY name”; $result = mysql_query($sql) or die(mysql_error()); while ($row = mysql_fetch_array($result)) { echo “<option value=\””. $row[‘id’] . “\”>” . htmlspecialchars($row[‘name’]) . “</option>”; } } function paginate($limit=10) { global $admin; $sql = “SELECT FOUND_ROWS();”; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result); $numrows = $row[0]; $pagelinks = “<div class=\”pagelinks\”>”; if ($numrows > $limit) { if(isset($_GET[‘page’])){ $page = $_GET[‘page’]; } else { $page = 1; } $currpage = $_SERVER[‘PHP_SELF’] . “?” . $_SERVER[‘QUERY_STRING’]; $currpage = str_replace(“&page=”.$page,””,$currpage); if($page == 1){ $pagelinks .= “<span class=\”pageprevdead\”>< PREV</span>”; }else{ $pageprev = $page - 1; $pagelinks .= “<a class=\”pageprevlink\” href=\”” . $currpage . “&page=” . $pageprev . “\”>< PREV</a>”; } $numofpages = ceil($numrows / $limit); $range = $admin[‘pageRange’][‘value’]; if ($range == “” or $range == 0) $range = 7; $lrange = max(1,$page-(($range-1)/2)); $rrange = min($numofpages,$page+(($range-1)/2)); if (($rrange - $lrange) < ($range - 1)) { if ($lrange == 1) { $rrange = min($lrange + ($range-1), $numofpages); } else { $lrange = max($rrange - ($range-1), 0); } } if ($lrange > 1) { $pagelinks .= “..”; } else { $pagelinks .= “ ”; } for($i = 1; $i <= $numofpages; $i++){ if ($i == $page) { $pagelinks .= “<span class=\”pagenumdead\”>$i</span>”; } else { if ($lrange <= $i and $i <= $rrange) { $pagelinks .= “<a class=\”pagenumlink\” “ . “href=\”” . $currpage . “&page=” . $i . “\”>” . $i . “</a>”; } } } if ($rrange < $numofpages) { $pagelinks .= “..”; } else { $pagelinks .= “ ”; } if(($numrows - ($limit * $page)) > 0){ $pagenext = $page + 1; $pagelinks .= “<a class=\”pagenextlink\” href=\”” . $currpage . “&page=” . $pagenext . “\”>NEXT ></a>”; } else { $pagelinks .= “<span class=\”pagenextdead\”>NEXT ></span>”; } } else { $pagelinks .= “<span class=\”pageprevdead\”>< “ . “PREV</span> ”; $pagelinks .= “<span class=\”pagenextdead\”> “ . “NEXT ></span> ”; } $pagelinks .= “</div>”; return $pagelinks; } function bbcode($data) { $sql = “SELECT * FROM forum_bbcode”; $result = mysql_query($sql); if (mysql_num_rows($result) > 0) { while($row = mysql_fetch_array($result)) { $bbcode[‘tpl’][] = “/” . html_entity_decode($row[‘template’],ENT_QUOTES). “/i”; $bbcode[‘rep’][] = html_entity_decode($row[‘replacement’],ENT_QUOTES); } $data1 = preg_replace($bbcode[‘tpl’],$bbcode[‘rep’],$data); $count = 1; while (($data1 != $data) and ($count < 4)) { $count++; $data = $data1; $data1 = preg_replace($bbcode[‘tpl’],$bbcode[‘rep’],$data); } } return $data; } ?> I really am stumped with this one, think it's going to go down as an unsolved mystery and just scrap it.
  21. It still comes up with the same error. Thanks for the help anyway.
  22. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod FROM forum_forum WHERE id = 1' at line 1 SELECT forum_name as name, forum_desc as description, forum_moderator as mod FROM forum_forum WHERE id = 1
  23. Thanks for the suggestion but there's still the exact same error even with the code added as you'd suggested.
  24. I have another thread on here as I thought my problem was initially a SQL problem but I have tested the SQL command in my function and the compiler has signaled the SQL is fine. So the problem must be in the php coding of my site, my function that I am having problems with is : function getForum($id) { $sql = "SELECT forum_name as name, forum_desc as description, forum_moderator as formod FROM forum_forum WHERE id = '$id'"; $result = mysql_query($sql) or die(mysql_error() . “<br>” . $sql); $row = mysql_fetch_array($result); return $row; } I have tried everything and had no luck at all, please help!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.