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.

Arga

Members
  • Joined

  • Last visited

  1. Thank you for the positive comments, encouragement and feedback guys. I have resized the forum so that it fits the width of the other pages, it does 'feel' better while navigating the site now thank you! This is fantastic and just the sort of thing I wanted to be able to do, thank you for the heads up!
  2. Hi Guys, site: www.duplexgaming.co.uk I am getting close to finishing my first full website (I have played around with things before, but never with a purpose). It is a gaming clan website for people I play with and while I have a list of small fixes and some features to add it is mostly done. I would appreciate any feedback you have on my coding, the visual look and usability. I have made it from scratch myself using html/css/php/mysql (other than using the SMF forum software). I am using the SMF forum to manage login sessions which I use for my own CMS in the background (oh man, making that has been fun! not!). I realise I could have done myself a favour and used a proper CMS to begin with, but it is a little late for that now! There are some major things I am still planning to do: 1) Redo the header, it looks too 'boring' to me. 2) Add comments to the news articles. 3) Add a contact form. 4) Recoding the news article code, so that it is easier for others without html/css experience to add articles with headings, lists and images. (edit) If there is anything else you think should be added to this list let me know. I look forward to hearing your feedback!
  3. Arga replied to Arga's topic in Server Side
    I think I am following you, hooray! I have a friend visiting from Germany for a few days, but once that is past I will get back to the website and attempt this and then show you the code, if you do not mind. Thank you again for all the help!
  4. Arga replied to Arga's topic in Server Side
    Aha, I see. So as I am using /index.php?id=1 so that my events and news pages know if someone wants to view a specific event/news item, I need to be careful, as someone could edit that and cause problems when the page runs the SQL query using 'id'? Crafty little...! I really appreciate the heads up! If I understood the articles you linked correctly, in this case I can simply validate id to make sure it is a number, then apply mysql_real_escape_string() and it will be safe, in this case?
  5. Arga replied to Arga's topic in Server Side
    My input data is not safe? If it is only ever me inputting data is that ok? Could you point me towards any resources explaining this issue? I had never thought about how data count effect queries!
  6. Arga replied to Arga's topic in Server Side
    This is very interesting, is the aliases only useable inside the query (still much easier to follow, thank you so much), or can it be used to reference the data in the php afterwards?
  7. Arga replied to Arga's topic in Server Side
    I needed sleep last night, so took a step back and left it for this morning. Which worked well. As you can see from: dev.manbeans.com it is currently displaying the latest 3 (out of 3!) articles (wether they be news or events). I realised I had fudged the database, by having heading, page_path and page_url twice. Once in events and once in news, which was making me try and workout which I needed each time. Using what you have taught me above and re-arranging my database (new setup attached), I have used this query: <?php $sql = "SELECT s.heading, s.poster, s.date, s.intro_text, s.page_path, s.image_path FROM shared AS s ORDER BY s.id DESC LIMIT 3"; $news = @mysql_query($sql); if (!$news) echo('<p>Error performing query</p>'); while($row=@mysql_fetch_array($news)) echo ' <div class="news_post"> <a class="heading" href="http://dev.manbeans.com/' . $row['page_path'] . '">' . $row['heading'] . '</a> <h3>by <span>' . $row['poster'] . '</span> on ' . $row['date'] . '</h3> <a class="news_image" href="http://dev.manbeans.com/' . $row['page_path'] . '"><img alt="description here" src="/images/' . $row['image_path'] . '" /></a> <p>' . $row['intro_text'] . '</p> <a class="read_more" href="http://dev.manbeans.com/' . $row['page_path'] . '">READ MORE</a> <a class="comment" href="http://dev.manbeans.com/">Comment</a> </div>'; ?> Your suggestion above worked, but as you mentioned only returned the news data, this made me realise that having the same data in news and events was silly, so I renamed news_posts to shared, and now use that to contain any data that both news and events require. This made my query much more straight forward and thanks to what I have learnt from you I now only call the fields I need to. Thank you so much for your patience and taking the time to help me. My lack of knowledge/experience with databases had meant I caused myself real problems for no reason! mb_website.zip
  8. Arga replied to Arga's topic in Server Side
    I am really sorry I am making it so difficult to help me. I do appreciate all your time. I have changed the uploaded file above with the export using create. I hope it is correct this time. Man I feel out of my depth!
  9. Arga replied to Arga's topic in Server Side
    Thank you very much. I had not thought of that, I have attached it below (exported as .sql and then zipped as it would not let me upload .sql) I hope that is correct. (update: exported with create this time) mb_website.zip
  10. Arga replied to Arga's topic in Server Side
    Thank you for all your help SniderDK. I have just found an error in my original statement and so your fix. One of the columns was incorrectly named (np.event_id -> np.events_id). I have fixed that so the query no longer gives an error message, however it does (distressingly, hehe) return empty data. When I try the query in the database manager, it shows all the columns I would need, but no data in them at all. I cannot understand why. Another potential problem, is that the two tables (events and news) contain duplicate columns (page_path for instance) which both need yet how will I pick the relevant one if the query returns fields with nothing in? More food for thought. I think perhaps I am barking up the wrong tree, perhaps someone has another suggestion?
  11. Arga replied to Arga's topic in Server Side
    Ah you are correct, I should of posted that anyway, here it is: <?php $sql = "SELECT * FROM news_posts AS np, news AS n, events AS e WHERE n.id = np.news_id AND e.id = np.event_id ORDER BY np.id DESC LIMIT 3"; $news = @mysql_query($sql); if (!$news) exit('<p>Error performing query</p>'); while($row=mysql_fetch_array($news)) echo ' <div class="news_post"> <a class="heading" href="http://dev.manbeans.com/' . $row['page_path'] . '">' . $row['heading'] . '</a> <h3>by <span>' . $row['poster'] . '</span> on ' . $row['date'] . '</h3> <a class="news_image" href="http://dev.manbeans.com/' . $row['page_path'] . '"><img alt="description here" src="/images/' . $row['image_path'] . '" /></a> <p>' . $row['intro_text'] . '</p> <a class="read_more" href="http://dev.manbeans.com/' . $row['page_path'] . '">READ MORE</a> <a class="comment" href="http://dev.manbeans.com/">Comment</a> </div>'; ?> I hope this helps!
  12. Arga replied to Arga's topic in Server Side
    Thank you for the encouragement. I replaced with query with yours and still get "Error performing query". I don't understand your way any more than mine, even less infact. Am I going about this the wrong way completely? or am I on the right track?
  13. Arga replied to Arga's topic in Server Side
    On a side note, next time I am in the pub with my friends and we come up with an amazing idea for a website, I will seriously consider my lack of any experience or ability in making websites and not agree do it.......well perhaps!
  14. Hi Guys, I am hopeing someone here (with infinitely more experience in PHP and mySQL) can help me to solve a problem with my website. I am attempting to post 3 news posts on the main page, with the following code: <div class="news_post"> <a class="heading" href="http://dev.manbeans.com/' . $row['page_path'] . '">' . $row['heading'] . '</a> <h3>by <span>' . $row['poster'] . '</span> on ' . $row['date'] . '</h3> <a class="news_image" href="http://dev.manbeans.com/' . $row['page_path'] . '"><img alt="description here" src="/images/' . $row['image_path'] . '" /></a> <p>' . $row['intro_text'] . '</p> <a class="read_more" href="http://dev.manbeans.com/' . $row['page_path'] . '">READ MORE</a> <a class="comment" href="http://dev.manbeans.com/">Comment</a> </div> I am currently using 4 tables in my MYSQL database: Table Name: news_posts id (Unique) poster date event_id (P key) news_id (P key) image_id (P key) Table Name: events id (P key) name intro_text page_path Table Name: news id (P key) heading intro_text page_path Table Name: images id (P key) image_path I have only included above, information from each table that is required for the news posts and keys etc. I can currently call the last 3 news posts by news_posts id, however, to get the rest of the information I need to know which table to look for it in, eg. news items, need to use data from the 'news' table and events need data from the 'events' table. This is driving me up the wall. Using my Sitepoint book I just attempted: $sql = "SELECT * FROM news_posts INNER JOIN news ON news.id = news_id INNER JOIN events ON events.id = events_id ORDER BY news_posts.id DESC LIMIT 3"; I was attempting to use joins to link all the tables and take out all the data at once, so I could pick through it and use the parts I required. This jumps out at "Error performing query". I have had it working in a more simple format, but that was with duplicate data. I am now attempting to do a proper job and am well out of my depth. I would really appreciate any advice, even just pointing me in the direction of resources you think I would benefit from. If I have no supplied enough information, just let me know and I will get back to you. If you need to see the website, it can be viewed at dev.manbeans.com!
  15. Seems like you are doing well with your mac only webdesign! I just had a quick look at your blog and I love that the colour blend background moves with you as you scroll up and down, simple but effective! I had a quick look at gimp and the tutorials. It looks great and is free so ive downloaded it and will get myself started soon.

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.