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.

theoblack

Members
  • Joined

  • Last visited

  1. Hi, If you view www.unifydev.co.uk/blog/index.php in IE and FF, you'll notice there is 1px of space between the two divs on the may part of the page, giving it a rather peculiar shadow of the dotted border; anyone know how to solve this? Here is the CSS: /* Copyright unifydev.co.uk 2009 */ object { float:left; } body, html { background:#CCC6B6; font-size: 8pt; font-family: arial; color: #999999; text-align: right; } #wrap { background:#CCC6B6; margin:auto; width:879px; padding: 50px 0px 0px 0px; color:#7A7A7A; text-align: right; } #inner { background:#FFFFFF; margin:auto; width:879px; height: 100%; padding: 0px 0px 0px 0px; } #popup { background:#EAEAEA; width: 425pt; padding: 3pt 3pt 3pt 3pt; color: #708090; text-align: justify; font-size: 7pt; border-style:dotted; border-width:1px; border-color:#DCDCDC; margin: 0pt 0pt 0pt 0pt; font-family: verdana; } #nav { background:#FFFFFF; width: 121pt; padding: 0pt 0pt 0pt 20pt; color: #333333; text-align: left; font-size: 9pt; float: left; border-right: 0pt dashed #7A7A7A; } #nav h3{ background:#FFFFFF; padding:0pt 0pt 0pt 0pt; color: #2665AA; font-size: 8pt; font-family: arial; font-weight: normal; } #menu { background:#FFFFFF; width: 497pt; padding: 0pt 10pt 0pt 10pt; color: #333333; text-align: left; font-size: 9pt; float: right; border-left: 1pt dashed #7A7A7A; margin: 0pt 0pt 0pt 0pt; } #menu h1{ background:#FFFFFF; width: 425pt padding:0pt 0pt 0pt 0pt; color: #2665AA; font-size: 11pt; font-family: arial; text-align: left; } #menu h2{ background:#FFFFFF; width: 425pt padding:0pt 0pt 0pt 0pt; color: #2665AA; font-size: 8pt; font-family: arial; font-weight: normal; } #menu h2 img{ display: inline; } #menu h3{ background:#FFFFFF; width: 425pt padding:0pt 0pt 0pt 0pt; color: #2665AA; font-size: 8pt; font-family: arial; font-weight: normal; } #menu h4{ background:#FFFFFF; width: 425pt padding:0pt 0pt 0pt 0pt; color: #333333; font-size: 7pt; font-family: arial; font-weight: normal; } #menu h4 img{ display: inline; } #menu h5{ background:#FFFFFF; width: 425pt padding:0pt 0pt 0pt 0pt; color: #333333; font-size: 9pt; font-family: arial; font-style: normal; font-weight: normal; } hr { border-top: 1px dashed #7A7A7A; width: 100%; align: center; color: #ffffff; background-color: #ffffff; height: 0px; } img { margin:0; padding:0; display: block } a img { border-style: none; display: inline; } #footer { text-align: right; color: #7A7A7A; font-family: arial; font-size: 8pt; font-style: normal; float: left; } a:visited { color: #7A7A7A; font-family: arial; font-size: 8pt; font-style: normal; border-bottom: 1px dotted; border-color: #7A7A7A; text-decoration: none; } a:link { color: #7A7A7A; font-family: arial; font-size: 8pt; font-style: normal; text-decoration: none; text-underline-style: dotted; border-bottom: 1px dotted; border-color: #7A7A7A; } Hopefully you can help! Cheers.
  2. I used $_POST instead of the $_GET function. Common sense when you step back and look at it.
  3. I am, I'll implement methods to prevent injection once I've actually got a grip of the basic code. Why anyone would want to hack a personal blog is unknown to me, but such is life. Did I mention my area of expertise is "I'm Learning"?
  4. Sorted it myself, but thanks for trying.
  5. On the previous page, article.php?ID=3 for example - I have this now: <input type="hidden" name="ID" value="<?$ID = $_POST['ID']?>" /> But it is still refusing to work, any ideas?
  6. Hello, here is the code: <? //grabs the variables $Name = $_POST["Name"]; $Email = $_POST["Email"]; $Comment = $_POST["Comment"]; //gets mysql info include("connectdb.php"); $ID = (int)$_GET['ID']; $addcomment =MYSQL_QUERY("INSERT INTO comments (ID,Entry,Name,Email,Comment)". "VALUES ('$ID', 'NULL', '$Name', '$Email', '$Comment')"); //success... echo("Comment added."); ?> So, when the user clicks Submit - it takes the variables Name, Email & Comment and plugs them into the table with the correct date and Entry. The problem is with the ID. The previous page has the URL = article.php?ID=3 So in theory the $GET Function should take that ID number and bang it into the table too but it doesn't, any solutions? And yes, I've tried putting the $GET Fucntion before they connect to the DB.
  7. Here is my select function so far: include("connectdb.php"); $ID = (int)$_GET['content.ID']; $getnews = mysql_query("SELECT *, date_format(Date, '%a %D %b %Y | %H:%i') as FinalDate FROM content, comments WHERE content.ID='$ID' LIMIT 1 and comments.ID = content.ID"); while($r=mysql_fetch_array($getnews)){ extract($r); So I want to get everything from tables 'content' and 'comments', matching the comment.ID to content.ID, but it keeps returning this error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/unifydev/public_html/blog/testarticle2.php on line 26 Yet all the values are present in the tables?
  8. Hi chaps, I have 2 tables, that I wish to link in order to create comments that go along with the articles; my tables are as follows: COMMENTS - Entry (Auto_Increment) (Primary Key) ID Name (VarChar) Email (VarChar) Comment (LongText) Timestamp (DateTime) CONTENT - ID (Auto_Increment) (Primary Key) Date (DateTime) Title (Text) Text (LongText) Tags (VarChar) How would I go about linking these two together so that the post is displayed, and the relative comments below are displayed? i.e. Content_ID relating to ID or is it not the same as Access & VB?
  9. Indeed my solution seems to have worked, is there anyway to implement a function whereby test.php?ID=$ID + 1 (For going onto the next article?) test.php?ID=$ID - 1 (For going back to the previous article?) Once again, help is much appreciated!
  10. Hmm, I seem to have come up with the solution: echo("<h1>$Title</h1><h2><img src=\"clock.gif\"/> Published on <b>$FinalDate</b></h2>$Text<h4><img src=\"tag.gif\"/> $Tags</h4><a href=\"test.php?ID=$ID\">Link</a>");
  11. That doesn't pass the ID into the URL though? When combining the two echos into one I get another bloomin' syntax error! echo("<h1>$Title</h1><h2><img src=\"clock.gif\"/> Published on <b>$FinalDate</b></h2>$Text<h4><img src=\"tag.gif\"/> $Tags</h4><a href="test.php?ID=$_GET["ID"]>Link</a>");
  12. Hello chaps, searched high and low - but no to avail as I still don't understand! Basically, here is my code: <? include("connectdb.php"); $ID = (int)$_GET['ID']; $getnews = mysql_query("SELECT *, date_format(Date, '%a %D %b %Y | %H:%i') as FinalDate FROM content WHERE ID='$ID' LIMIT 1"); while($r=mysql_fetch_array($getnews)){ extract($r); echo("<h1>$Title</h1><h2><img src=\"clock.gif\"/> Published on <b>$FinalDate</b></h2>$Text<h4><img src=\"tag.gif\"/> $Tags</h4>"); echo '<a href="index.php?ID=$_GET['ID']>Link</a>'; } ?> As you can see, this page grabs the ID that is in the end of the URL and pops up the appropriate ID on screen. On the last echo I've tried to implement something whereby each post has it's own URL to it's own page - so it just shows that one post on a page by itself; for ease of use. I'm not sure if I'm doing this right, but bear with me - it states that there is a syntax error on that last echo? If I am doing this wrong, how would I go about getting each post to have it's own link? Cheers!
  13. At first I got into IT by building computers, and networking solutions with various Cat-types for my father at around the age of 14, I was obsessed and have been ever since. Aged 16 I built my first professional websites for a profit, and aged 18 I have my own portfolio to help pay for accomodation whilst in flying school and have now delved into homebrew CMS!
  14. Tel, thanks again - your border idea sparked a solution in my head, to faff around with the menu h2 img properties in the CSS and it seems to have worked! www.unifydev.co.uk/blog/test2.php is where I've got with it so far, a very simple CMS.

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.