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.

collie

Members
  • Joined

  • Last visited

  1. it was to do with my select statement i was using " '' " instead of " `` "
  2. the user_id is set to one as i only have one person in the database
  3. i am trying to work on a log in page and keep getting this error whether the login is correct or wrong Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\private_message_system\core\inc\user.inc.php on line 10 <?php // checks a given username and password combination, returning the users id function validate_credentials($user_name, $user_password) { $user_name = mysql_real_escape_string($user_name); $user_password = sha1($user_password); $result = mysql_query("SELECT 'user_id' FROM 'users' WHERE 'user_name' = '{$user_name}' AND 'user_password' = '{$user_password}' "); if (mysql_num_rows($result) != 1) { //line 10 return false; } return mysql_result($result, 0); } ?>
  4. im wanting to use mysql and php to insert PDF files into my database, and then retrieve them and display them. how would i go about doing this
  5. i am trying to take data from a form and insert it into multiple mysql tables. here is the feilds and php script author - auth_id, auth_first, auth_second, auth_telephone, auth_email book - book_id, auth_id, book_genre_id, book_title, book_num_pages, book_synopsis, book_description, book_rating book genre - book_genre_id, book_genre that is all the fields i have in my database this is the code i have, the problem is that it will insert a new author, but wont add in the book from the form. <form id="contact-form" method="post" action="database.php" > <label for="fname">First Name: <span class="required">*</span></label> <input type="text" id="fname" name="fname" value="" placeholder="John" required="required" /> <label for="auth-name">Second Name: <span class="required">*</span></label> <input type="text" id="sname" name="sname" value="" placeholder="Doe" required="required" /><br /> <label for="email">Email Address: <span class="required">*</span></label> <input type="email" id="email" name="email" value="" placeholder="johndoe@example.com" required="required" /> <label for="telephone">Telephone: <span class="required">*</span></label> <input type="text" id="telephone" name="telephone" value="" placeholder="" required="required" /><br /> <label for="genre">Genre: <span class="required">*</span></label> <select id="genre" name="genre" placeholder="please select one..." required="required"> <option value="please-select">Please select one..</option> <option text="murder_mystery" value="1">Murder Mystery</option> <option text="romance" value="2">Romance</option> <option text="sci_fi" value="3">Sci-Fi</option> <option text="horror" value="4">Horror</option> <option text="thriller" value="5">Thriller</option> <option text="screen_plays" value="6">Screen Play's</option> <option text="poetry" value="7">Poetry</option> <option text="childrens" value="8">Children's</option> <option text="non_fiction" value="9">Non-Fiction</option> <option text="comedy" value="11">Comedy</option> <option text="other" value="10">Other</option> </select> <label for="numpages">Number of Pages: <span class="required">*</span></label> <select id="numpages" name="numpages"> <option value="num-page">Please Select one..</option> <option value="0-100">0-100</option> <option value="100-300">100-300</option> <option value="300-500">300-500</option> <option value="500">500+</option> </select><br /> <label for="booktitle">Book Title: <span class="required">*</span></label> <input type="text" id="booktitle" name="booktitle" value="" placeholder="John Doe" required="required" /> <br /> <label for="description">Book Description: <span class="required">*</span></label> <textarea id="bookdescription" name="description" placeholder="max 40 words describing your work, this will effectively be how you sell your bookto the reader" required="required" data-minlength="20"></textarea> <br /> <label for="synopsis">Book Synopsis: <span class="required">*</span></label> <textarea id="synopsis" name="synopsis" placeholder="max 100 words of the synopsis of your book,to the reader" required="required" data-minlength="20"></textarea> <br /> <label for="file">Filename:</label> <input type="file" name="file" id="file"> <br /> <label for="check_tc">Do you agree to the T&C<span class="required">*</span></label> <input type="checkbox" id="check_tc" name="check_tc" required="required" /> <br /> <input type="submit" value="submit" id="submit-button" /> </form> <?php $connection = mysql_connect("localhost", "root", ""); if(!$connection) { die("database connection failed: " . mysql_error()); } $db_select = mysql_select_db("good-read", $connection); if(!$db_select) { die("database selection failed: " . mysql_error()); } $sql = "INSERT INTO author (auth_first, auth_second, auth_email, auth_telephone) VALUES ('$_POST[fname]','$_POST[sname]','$_POST[email]', '$_POST[telephone]')"; mysql_query($sql, $connection); echo "1 record added"; $sql_book = "INSERT INTO book (book_title, book_num_pages, book_genre_id book_description, book_synopsis) VALUES ('$_POST[booktitle]','$_POST[genre]', '$_POST[numpages]','$_POST[description]','$_POST[synopsis]')"; mysql_query($sql_book, $connection); echo "1 record added"; mysql_close($connection); ?> any help would be much appreciated regards collie
  6. is their a way to view pdf in the browser that will work on all browsers and devices, is there any free versions online and if not what are the best paid ones. i have tried PDF.js but the problem i found it works well with one pdf, but i want to display so many pdfs on the web page, and when you click one it will then load it in the browser. thanx
  7.    collie reacted to a post in a topic: margin left and right help(overlapping)
  8.    collie reacted to a post in a topic: margin left and right help(overlapping)
  9. got it working with a list, thanx mteam www.davidcolligan.com/portfolio2.html just some style tweaks but got it sitting the right way now. thank you
  10. i forgot about you messaging me lol sorry, ill try that ul and lil first n see if that works lol.
  11. i tried that, but its still the same if i add more into the first one, i uploaded it again with more text so you can see what happens
  12. hi everyone working on my portfolio site, have my portfolio page designed and laid out the way i want the only problem i have is i have one piece of work floated to the left and another piece floated to the right but underneath which can be seen at www.davidcolligan.com/portfolio2.html . which looks fine, but i have a margin-bottom on the top portfolio piece but once i add more content to the top one it just overlaps the second peice of work, what is the best way to remove the margin-bottom and have it not overlap but just keep going on without interfering with the next portfolio piece any help would be great thanks collie
  13.    collie reacted to a post in a topic: css help positioning boxes
  14. hi everyone, working on my new portfolio page, and i have an idea in my head but it doesnt seam to look right the way i have coded it. the problem is that i have the skills used on recent websites ive created in rounded boxes, i can get them to pad out to the right, but once i have too many skills and they have to drop down to the next line, they just overlap each other. i have tried using margin's to stop this but it doesn't seem to be working. also after one portfolio section, i have another one directly under it, but i want spacing between them, i have tried the <br /> and margin bottom again. but it just sits on top of the first portfolios skills. the problems can be viewed at www.davidcolligan.com/portfolio2.html any advice or help would be much appreciated thanks collie
  15.    collie reacted to a post in a topic: twitter jquery problem
  16. Cheers elite I'll try that when I get home and let u know how I get on
  17. I know ur only helping, but don't see why u need my password. U could just tell me what to do
  18. I won't be givingout my username n password lol it should have nuttin to do wiv yhe widgets,
  19. tried that also lol, my tweets arent protected. this is annoying now lol

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.