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.

Ryan_Belfast

Members
  • Joined

  • Last visited

Everything posted by Ryan_Belfast

  1. Ryan_Belfast replied to Ryan_Belfast's topic in Frontend
    Thanks everyone. Resolved.
  2. Ryan_Belfast replied to Ryan_Belfast's topic in Frontend
    Hey, appreciate the reply but your suggested changes do not do anything, at least for me, it actually pushes the image further up the page.
  3. Ryan_Belfast posted a topic in Frontend
    I'm an idiot. My footer wont stretch horizontally ( leaves gaps at sides and at bottom of page). I know it's probably something simple but for the life of me I cant figure it out. Any help is greatly appreciated, Link below. http://rzza.atspace.com/
  4. Hey guys, Ok so I have a form. On this form are two text boxes. Each text box has a value so text appears in the box. I use the onclick event handler to remove this text when the user clicks on the box, onclick="this.value = '';" I want to repopulate the textbox with text if the user clicks off it. I know the onblur event handler iniially seems like a good choice but when the form is submitted or the user selects another field on the form, text they will have entered is replaced by the value assigned by onblur and I dont want it to do this if the user has entered their own information (if that makes sense), onblur="this.value = 'Please enter your name';" I was wondering if anyone had a solution to this problem ? If anyone does not understand then please say and I will try to explain better. Thanks !
  5. Changed the padding to 2px, no effect
  6. Thanks ! That seems to have fixed the form obfuscation but the layout has changed. I'm not the greatest with css, can you have another look and see what you think ? The border around #form does not nest round the container and the image has moved from the blue background.
  7. Can you guys have a look at the following page and help me figure out why I cannot select form fields on any browser. I know its probably a CSS issue but I cant figure it out. I only coded the contact form so I cant make significant changes to layout. http://www.wholepersondentist.com/ Thanks !
  8. Resolved. Sorry about spam post
  9. Thanks Jay, Query Works now.
  10. Updated, received syntax error. I have no idea about correct syntax .... 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 '' at line 1 Updated line $result = mysqli_query($conn,$query) or die(mysqli_error($conn));
  11. Frustrating error I cant seem to get rid of. Anyone help me out ? The error Warning: mysqli_error() expects exactly 1 parameter, 0 given in /Users/labuser/Sites/dbconnect.php on line 20 The Line the error is referring to $result = mysqli_query($conn,$query) or die(mysqli_error()); Full code <?php $value = $_POST["valuelist"]; $conn = mysqli_connect('localhost', 'labuser', '') or die ("No Connection"); mysqli_select_db($conn, 'labuser') or die("test will not open"); $query = "SELECT MemberName, Age from Member where BandName = ".$value ; $result = mysqli_query($conn,$query) or die(mysqli_error()); echo "<table border='1'><tr><th>Member Name</th><th>Age</th></tr>"; while($row = mysqli_fetch_array($result)) { echo "<tr><td>" .$row[0]. "</td><td>" .$row[1]; echo "</td></tr>"; } echo "</table>"; mysqli_close($conn); ?> <form action = "query.php"> <input type = "submit" value = "return"> </form>
  12. Resolved. Thanks
  13. Can anyone tell me why this is returning an invalid Query error, from what I can see there is nothing wrong with it .... <?php $conn = mysqli_connect("localhost", "labuser", "") or die ("No connection"); mysqli_select_db($conn, "labuser") or die("test will not open"); $query = "select membername,age from MEMBERS"; $result = mysqli_query($conn, $query) or die("Invalid query"); echo "<table border='1'><tr><th>Member Name</th><th>Age</th>"; while($row = mysqli_fetch_array($result)) { echo "<tr><td>" . $row[0] . "</td><td>" . $row[1]; } echo "</table>"; mysqli_close($conn); ?>
  14. Thanks Nathan. Has got me well underway. +1 .
  15. http://www.web-development-blog.com/archives/tutorial-create-a-zip-file-from-folders-on-the-fly/ Dunno if that's much use to you but probably worth checking out if you haven't already.
  16. University homework, my heads completely melted and yeah, I know its probably very basic PHP MYSQL but I cant get my head around what exactly he means. I have a table set up, shown below ; -- phpMyAdmin SQL Dump -- version 3.2.4-rc1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Mar 18, 2010 at 01:54 PM -- Server version: 5.0.88 -- PHP Version: 5.3.0 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `labuser` -- -- -------------------------------------------------------- -- -- Table structure for table `Member` -- CREATE TABLE IF NOT EXISTS `Member` ( `MemberName` char(20) NOT NULL default '', `Age` smallint(6) NOT NULL, `Instrument` varchar(20) NOT NULL, `BandName` char(20) NOT NULL, PRIMARY KEY (`MemberName`), KEY `fkey` (`BandName`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `Member` -- INSERT INTO `Member` (`MemberName`, `Age`, `Instrument`, `BandName`) VALUES ('Chris Berry', 27, 'Vocals', 'Depeche Mode'), ('Craig Dodds', 21, 'Bass', 'A Perfect Circle'), ('Craig Taylor', 24, 'Drums', 'Depeche Mode'), ('Dan Lavery', 22, 'Vocal', 'Tool'), ('Dave Brown', 24, 'Bass', 'Tool'), ('Joe Hill', 22, 'Guitar', 'Tool'), ('Joe Soap', 32, 'Bass', 'Placebo'), ('John Boyle', 31, 'Drums', 'Placebo'), ('Keron Tudor', 35, 'Guitar', 'Placebo'), ('Leroy Jenkins', 24, 'Bass', 'Depeche Mode'), ('Marc Beggan', 39, 'Drums', 'Stone Roses'), ('Mark Begley', 23, 'Vocals', 'A Perfect Circle'), ('Mark Farmer', 32, 'Bass', 'Stone Roses'), ('Maynard Keenan', 22, 'Drums', 'A Perfect Circle'), ('Paddy Lynn', 33, 'Guitar', 'Stone Roses'), ('Paddy Maguire', 24, 'Guitar', 'A Perfect Circle'), ('Phil Patterson', 21, 'Drums', 'Tool'), ('Ryan Gallagher', 22, 'Guitar', 'Depeche Mode'), ('Ryan Morgan', 29, 'Vocals', 'Stone Roses'), ('Stuart Baird', 27, 'Vocals', 'Placebo'); -- -- Constraints for dumped tables -- -- -- Constraints for table `Member` -- ALTER TABLE `Member` ADD CONSTRAINT `fkey` FOREIGN KEY (`BandName`) REFERENCES `band` (`BandName`); Get the band member name and age for members whose band name is <drop down value> I have to Implement the retrieval query: - Using a drop down list to display the values taken from the database for one of the WHERE or AND clause values. - Print the result to an html table. Does that I mean I need to populate the drop down list from the table ? How would I go about doing that? Really confused, anyone help me out by explaining what the hell he means. Cheers. Shown Below is the HTML/PHP. Nothing as of yet. LOL <html> <body> <form action="down.php" method="post"> <select name="Band Name"> <option value="1"></option> <option value="2"></option> <option value="3"></option> <option value="4"></option> <option value="5"></option> </select> </form> <?php $con = mysql_connect("localhost","labuser",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("labuser", $con); </body> </html>
  17. Ahh, I am such an idiot ! I really need to sleep more. Got confused with mixed extensions, jpeg and jpg. Never thought to check. Issue is resolved, thanks bocaj.
  18. Unfortunately I dont have hosting at the minute and cant really be bothered setting up something free just for the purpose of this post. Anyways, Can anyone tell me why one image will display on my webpage while others, exactly the same dimensions will not? (Sorry about the very messy markup) What I mean The image "smoke.jpg" will display fine in any column When I try and set the images to two seperate to "smoke" below they will not display at all, nor will any image for that matter. Each image is exactly the same size. The HTML/CSS <div id="col1"> <h1>Title</h1> <hr /> <img src="images/iphone.png" class="logoright" alt="logoright" width="265" height="149" /> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s</p> <h1>Featured Work</h2> </div> <div class="column1"> <img src="images/smoke.jpeg" alt="smoke cessation" class="img"/> <h4>Smoking Cessation</h4> <small>Cras condimentum arcu elementum nibh condimentum</small> <hr /> <p>Cras condimentum arcu elementum nibh condimentum elementum. Sed in sem eget ligula pulvinar facilisis et ut tellus. Praesent feugiat, ipsum non luctus ultrices, neque diam venenatis purus, eu mollis justo quam vitae dolor. </p> </div> <div class="column2"> <img src="images/mono.jpeg" alt="monogram" class="img"/> <h4>Personal Identity Devlopment</h4> <small>Cras condimentum arcu elementum nibh condimentum</small> <hr /> <p>Cras condimentum arcu elementum nibh condimentum elementum. Sed in sem eget ligula pulvinar facilisis et ut tellus. Praesent feugiat, ipsum non luctus ultrices, neque diam venenatis purus, eu mollis justo quam vitae dolor. </p> </div> <div class="column3"> <img src="images/ico.jpeg" alt="icon" class="img"/> <h4>Iconographic Development</h4> <small>Cras condimentum arcu elementum nibh condimentum</small> <hr /> <p>Cras condimentum arcu elementum nibh condimentum elementum. Sed in sem eget ligula pulvinar facilisis et ut tellus. Praesent feugiat, ipsum non luctus ultrices, neque diam venenatis purus, eu mollis justo quam vitae dolor.</p> </div> #col1 { width: 980px; height: auto; float: left; margin: 0px; } .column1 { float: left; width: 290px; margin-top: 15px; } .column2 { float: left; width: 290px; margin-left: 50px; margin-right:50px; margin-top: 15px; } .column3 { float: left; width: 290px; margin-top: 15px; } Please tell me if the post does not make sense and I will try and improve my explanaton. Problem is not incorrect directory related etc, tested on multiple browsers, same problem. It has to be the dodgy markup ! Thanks
  19. Cant believe I missed that. Thanks very much andyl and siriusfire. Everything works fine now.
  20. Allright so I have this PHP homework, basically I have to allow a user to enter a number into a text box between 10 and 60. PHP is then required to "simulate a dice rolling" 10 times using a for loop. The 10 "rolls" are then added together and compared to the users entry in the text box. It's a basic game, if the user guesses correctly they win etc. etc. Anyway, the code should explain things better, the only problem i am having is that the maximum of 10 rolls of the dice should be 60, but occasionally the result is more than this, more than often the number 66. Have no idea why its doing this. I've tried my best to explain, please ask questions if you don't understand what the hell im rambling on about. Cheers. Ignore the lack of standards in my markup. HTML <html> <head><title>question two html</title></head> <body> <form action="Q2.php" method="post"> <br> <h1>Enter a number between 10 and 60 in the box below. This is your guess. The object of the game is to try and get as close to the number the program calculates. .</h1> <br> <input type="text" maxlength="2" name="usersguess"> <br> <p> <input type="submit" value="Submit"> </p> <p> <input type="reset" value="Reset Form"> </p> </form> </body> </html> PHP <html> <head><title>question two php</title></head> <body> <?php $guess=$_POST["usersguess"]; $dice=rand(1,6); $sum; for ($i = 0; $i <= 10; $i++) { $dice; $sum= $sum + $dice; } $diff= abs($guess-$sum); if($guess<=9 || $guess>=61){ print "Invalid entry. Please enter a number between 10 and 60."; } elseif($guess==$sum){ print "WINNER!.You guessed $guess and the dice rolled $sum."; } elseif($diff<=5){ print "You were within 5. Unlucky !.You guessed $guess and the dice rolled $sum."; } else{ print "Unlucky this time.You guessed $guess and the dice rolled $sum."; } ?> </body> </html>
  21. PHP has never been my thing, unfortunately, the course I a currently studying has a PHP module this semester and I am currently trying to get my head around the following homework exercise. Any help would be appreciated. Q3. [ See Week 3 Worksheet on arrays ] a. Create an html page to enter a row number (1-6) in a textbox to choose from a list of student records. b. Create a php script to receive the chosen row number ; • Assign 6 values (rows) into a 2 dimensional sequential array using the array function: $list = array(array(42356, ‘J Smith’,55), ………,array(45243, ‘M Fisher’,39) ); The 6 values should be those of the student number (5 figure integer), student name and module mark for 6 different students using values of your choice [see PHP4.ppt for more examples about 2D sequential arrays ]. • Print out the name of the student (got from the student list array), then underneath return an html table with the complete details of the student for the row chosen (got from the student list array), along with table heading values Student Number, Student Name & Module Mark. [see Worksheet 3 question 2 for html table details] e.g. Student Name is J Smith Student details are: Student Number Student Name Module Mark 42356 J Smith 55
  22. IMO the overall design has the ability to work very well with the logo, however, I am really not a fan of the general typography. I think it looks "chunky" and "filling". There is just too much text on the page.
  23. Overall I really like the design, the only thing I would say is that the image that runs horizontally directly under your header is taking away from the great design elsewhere. I would remove that image, it looks incomplete where it is placed. Another thing I would do is correct your markup to completely comply with W3C XHTML 1.0 Strict standards.
  24. Allright, problem sorted again, thanks Jack. Body width was not set to 100%. I'm actually an idiot.

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.