Jump to content

synchro_irl

Members
  • Posts

    56
  • Joined

  • Last visited

    Never

Everything posted by synchro_irl

  1. just a quick question there im trying to change the size of the font in www.seach4trade.net, jjust the text here: http://search4trade.net/userLogin1.php and ust lock logon, without entering anything, see this text,: " You did not fill in a required field." I need this to be bigger and i need my tables to be bigger as well, as seen when u enter a search here: enter cork and tiler as the 2 search criteria and have a look i head that the style sheet determines, pretty much everything in terms of the output of data on th website im using css and iv attached the file, can u just tell me, if its just a case of editing this style.css file somewhere to get the tables to print out out larger the font to be printed out bigger! All the best here's style.css: table { border-collapse: collapse; border: 1px solid #03476F; font: normal 11px verdana, arial, helvetica, sans-serif; color: #363636; background: #92C428; } caption { text-align: center; font: bold 18px arial, helvetica, sans-serif; background: transparent; padding:6px 4px 8px 0px; color: #03476F; text-transform: uppercase; } td, th { border: 1px dotted #03476F; padding: .4em; color: #363636; } thead th, tfoot th { font: bold 11px verdana, arial, helvetica, sans-serif; border: 1px solid #03476F;; text-align: left; background: #4591AD; color: #FFFFFF; padding-top:3px; } tbody td a { background: transparent; text-decoration: none; color: #363636; } tbody td a:hover { background: #C2F64D; color: #363636; } tbody th a { font: normal 11px verdana, arial, helvetica, sans-serif; background: transparent; text-decoration: none; font-weight:normal; color: #363636; } tbody th a:hover { background: transparent; color: #363636; } tbody th, tbody td { vertical-align: top; text-align: left; } tfoot td { border: 1px solid #03476F; background: #4591AD; padding-top:3px; color: #FFFFFF; } .odd { background: #AEE239; } tbody tr:hover { background: #FFD800; border: 1px solid #03476F; color: #FFFFFF; } tbody tr:hover th, tbody tr.odd:hover th { background: #FFD800; color: #FFFFFF; } * { margin: 0; padding: 0; } body { background: #F6F6F6 url(images/img01.jpg) repeat-x; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 12px; color: #6B6B6B; } form { } input, textarea { padding: 2px 5px; border: 1px solid #EBEBEB; font: bold 12px "Trebuchet MS", Arial, Helvetica, sans-serif; color: #6B6B6B; } h1, h2, h3, h4 { margin: 0; } h2, h3, h4 { margin-bottom: 20px; padding-bottom: 9px; border-bottom: 1px solid #F2F2F2; letter-spacing: -0.035em; font-weight: normal; color: #37404C; } h2 { font-size: 28px; } h3 { font-size: 16px; font-weight: bold; } h4 { font-size: 14px; font-weight: bold; } p, ul, ol { margin-bottom: 1.5em; line-height: 170%; text-align: justify; } ul, ol { margin-left: 3em; } dl.list1 { margin: 0; padding: 0; list-style: none; } dl.list1 dt { float: left; width: 70px; } dl.list1 dd { margin-bottom: 10px; } dl.list1 a { color: #666666; } ul.list2 { margin: 0; padding: 0; list-style: none; line-height: normal; } ul.list2 li { float: left; margin: 0 18px 18px 0; } ul.list2 li.nopad { margin-right: 0; } blockquote { margin-left: 3em; margin-right: 3em; } a { color: #FF5A00; } a:hover { text-decoration: none; } a img { border: none; } img.left { float: left; margin: 5px 20px 0 0; } img.right { float: right; margin: 5px 0 0 20px; } /* Wrapper */ #wrapper { width: 960px; margin: 0 auto; background: url(images/img02.jpg) repeat-y; } #wrapper2 { background: url(images/img10.jpg) no-repeat left bottom; } /* Header */ #header { height: 140px; background: #087FE7 url(images/img03.jpg) no-repeat; } /* Logo */ #logo { float: left; } #logo h1 { margin: 0; padding: 90px 0 0 78px; text-transform: lowercase; letter-spacing: -3px; font-size: 40px; color: #FFFFFF; } #logo h1 a { text-decoration: none; color: #FFFFFF; } /* Menu */ #menu { float: right; } #menu ul { margin: 0; padding: 112px 78px 0 0; list-style: none; line-height: normal; } #menu li { display: inline; } #menu a { padding-left: 40px; text-decoration: none; font-size: 13px; font-weight: bold; color: #FFFFFF; } #menu a:hover { text-decoration: underline; } /* Page */ #page { background: url(images/img04.jpg) no-repeat; } /* Content */ #content { float: left; width: 555px; padding: 0 0 0 76px; } .post { padding-top: 50px; } .post .title { } .post .title a { text-decoration: none; color: #37404C; } .post .title a:hover { text-decoration: underline; } .post .entry { } .post .meta { height: 16px; margin: 0; padding: 10px; background: url(images/img07.jpg) repeat-x left bottom; line-height: normal; } .post .meta .posted { display: block; float: left; } .post .meta .permalink { display: block; float: right; padding-left: 17px; background: url(images/img09.gif) no-repeat left center; } .post .meta .comments { display: block; float: right; padding: 0 30px 0 19px; background: url(images/img08.gif) no-repeat left center; } /* Sidebar */ #sidebar { float: right; width: 186px; padding: 67px 76px 0 0; } #sidebar ul { margin: 0; padding: 0; list-style: none; } #sidebar li { margin-bottom: 40px; } #sidebar li ul { } #sidebar li li { margin: 0; } /* Search */ #search { } #search br { display: none; } #search input { padding: 1px 5px; border-top: 1px solid #BAD300; border-left: 1px solid #A9C817; border-right: 1px solid #7DAB00; border-bottom: 1px solid #578900; background: #6E9D00 url(images/img18.gif) repeat-x; font-size: 11px; font-weight: bold; color: #FFFFFF; } #search #s { width: 130px; padding: 2px 5px; background: #FFFFFF; border: 1px solid #EBEBEB; font: bold 12px "Trebuchet MS", Arial, Helvetica, sans-serif; color: #6B6B6B; } /* Widebar */ #widebar { margin: 0 50px; padding: 25px 28px 0 28px; background: #F2F2F2 url(images/img11.gif) repeat-x; } #widebar #colA { float: left; width: 260px; } #widebar #colB { float: left; width: 260px; padding-left: 45px; } #widebar #colC { float: left; width: 186px; padding-left: 45px; } /* Footer */ #footer { height: 108px; background: url(images/img05.jpg) no-repeat; } #footer p { margin: 0; padding-top: 45px; text-align: center; color: #8E8E8E; } #footer a { color: #666666; }
  2. thanks for the help people really means a lot here is my style sheet, im not familiar with where it goes to be honest, i would really appreciate some guidance. i also want to increase the size of my tables, here is a pic of my tables, they're where to small: thanks very much table { border-collapse: collapse; border: 1px solid #03476F; font: normal 11px verdana, arial, helvetica, sans-serif; color: #363636; background: #92C428; } caption { text-align: center; font: bold 18px arial, helvetica, sans-serif; background: transparent; padding:6px 4px 8px 0px; color: #03476F; text-transform: uppercase; } td, th { border: 1px dotted #03476F; padding: .4em; color: #363636; } thead th, tfoot th { font: bold 11px verdana, arial, helvetica, sans-serif; border: 1px solid #03476F;; text-align: left; background: #4591AD; color: #FFFFFF; padding-top:3px; } tbody td a { background: transparent; text-decoration: none; color: #363636; } tbody td a:hover { background: #C2F64D; color: #363636; } tbody th a { font: normal 11px verdana, arial, helvetica, sans-serif; background: transparent; text-decoration: none; font-weight:normal; color: #363636; } tbody th a:hover { background: transparent; color: #363636; } tbody th, tbody td { vertical-align: top; text-align: left; } tfoot td { border: 1px solid #03476F; background: #4591AD; padding-top:3px; color: #FFFFFF; } .odd { background: #AEE239; } tbody tr:hover { background: #FFD800; border: 1px solid #03476F; color: #FFFFFF; } tbody tr:hover th, tbody tr.odd:hover th { background: #FFD800; color: #FFFFFF; } /* Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License */ * { margin: 0; padding: 0; } body { background: #F6F6F6 url(images/img01.jpg) repeat-x; font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; font-size: 12px; color: #6B6B6B; } form { } input, textarea { padding: 2px 5px; border: 1px solid #EBEBEB; font: bold 12px "Trebuchet MS", Arial, Helvetica, sans-serif; color: #6B6B6B; } h1, h2, h3, h4 { margin: 0; } h2, h3, h4 { margin-bottom: 20px; padding-bottom: 9px; border-bottom: 1px solid #F2F2F2; letter-spacing: -0.035em; font-weight: normal; color: #37404C; } h2 { font-size: 28px; } h3 { font-size: 16px; font-weight: bold; } h4 { font-size: 14px; font-weight: bold; } p, ul, ol { margin-bottom: 1.5em; line-height: 170%; text-align: justify; } ul, ol { margin-left: 3em; } dl.list1 { margin: 0; padding: 0; list-style: none; } dl.list1 dt { float: left; width: 70px; } dl.list1 dd { margin-bottom: 10px; } dl.list1 a { color: #666666; } ul.list2 { margin: 0; padding: 0; list-style: none; line-height: normal; } ul.list2 li { float: left; margin: 0 18px 18px 0; } ul.list2 li.nopad { margin-right: 0; } blockquote { margin-left: 3em; margin-right: 3em; } a { color: #FF5A00; } a:hover { text-decoration: none; } a img { border: none; } img.left { float: left; margin: 5px 20px 0 0; } img.right { float: right; margin: 5px 0 0 20px; } /* Wrapper */ #wrapper { width: 960px; margin: 0 auto; background: url(images/img02.jpg) repeat-y; } #wrapper2 { background: url(images/img10.jpg) no-repeat left bottom; } /* Header */ #header { height: 140px; background: #087FE7 url(images/img03.jpg) no-repeat; } /* Logo */ #logo { float: left; } #logo h1 { margin: 0; padding: 90px 0 0 78px; text-transform: lowercase; letter-spacing: -3px; font-size: 40px; color: #FFFFFF; } #logo h1 a { text-decoration: none; color: #FFFFFF; } /* Menu */ #menu { float: right; } #menu ul { margin: 0; padding: 112px 78px 0 0; list-style: none; line-height: normal; } #menu li { display: inline; } #menu a { padding-left: 40px; text-decoration: none; font-size: 13px; font-weight: bold; color: #FFFFFF; } #menu a:hover { text-decoration: underline; } /* Page */ #page { background: url(images/img04.jpg) no-repeat; } /* Content */ #content { float: left; width: 555px; padding: 0 0 0 76px; } .post { padding-top: 50px; } .post .title { } .post .title a { text-decoration: none; color: #37404C; } .post .title a:hover { text-decoration: underline; } .post .entry { } .post .meta { height: 16px; margin: 0; padding: 10px; background: url(images/img07.jpg) repeat-x left bottom; line-height: normal; } .post .meta .posted { display: block; float: left; } .post .meta .permalink { display: block; float: right; padding-left: 17px; background: url(images/img09.gif) no-repeat left center; } .post .meta .comments { display: block; float: right; padding: 0 30px 0 19px; background: url(images/img08.gif) no-repeat left center; } /* Sidebar */ #sidebar { float: right; width: 186px; padding: 67px 76px 0 0; } #sidebar ul { margin: 0; padding: 0; list-style: none; } #sidebar li { margin-bottom: 40px; } #sidebar li ul { } #sidebar li li { margin: 0; } /* Search */ #search { } #search br { display: none; } #search input { padding: 1px 5px; border-top: 1px solid #BAD300; border-left: 1px solid #A9C817; border-right: 1px solid #7DAB00; border-bottom: 1px solid #578900; background: #6E9D00 url(images/img18.gif) repeat-x; font-size: 11px; font-weight: bold; color: #FFFFFF; } #search #s { width: 130px; padding: 2px 5px; background: #FFFFFF; border: 1px solid #EBEBEB; font: bold 12px "Trebuchet MS", Arial, Helvetica, sans-serif; color: #6B6B6B; } /* Widebar */ #widebar { margin: 0 50px; padding: 25px 28px 0 28px; background: #F2F2F2 url(images/img11.gif) repeat-x; } #widebar #colA { float: left; width: 260px; } #widebar #colB { float: left; width: 260px; padding-left: 45px; } #widebar #colC { float: left; width: 186px; padding-left: 45px; } /* Footer */ #footer { height: 108px; background: url(images/img05.jpg) no-repeat; } #footer p { margin: 0; padding-top: 45px; text-align: center; color: #8E8E8E; } #footer a { color: #666666; }
  3. im thinkin of creating another website. but im not sure whether to use, c# and sq server 2005, or php and MYSQL. qhy should i use PHP AGAIN? this is the big question in my head! please, i wood like to hear from you all on this one thanks very much
  4. HEY GUYS HOPE ALL IS WELL i have a website heres a sample pic of it: http://img404.imageshack.us/my.php?image=screensi6.png anyway, take a look at the size font, i really need to increase teh size of teh font, and the style, how do i do this, all the font, printing out from the php, is the same size as that seen in the sample pic above where it says "Return to SearchPage" and "find comments on a tradesman" i know i might have posted a thread like this before, but i still haven't resolved this issue any ideas guys thanks ed
  5. HEY GUYS HOPE ALL IS WELL i have a website heres a sample pic of it: http://img404.imageshack.us/my.php?image=screensi6.png anyway, take a look at the size font, i really need to increase teh size of teh font, and the style, how do i do this, all the font, printing out from the php, is the same size as that seen in the sample pic above where it says "Return to SearchPage" and "find comments on a tradesman" i know i might have posted a thread like this before, but i still haven't resolved this issue any ideas guys thanks ed
  6. thanks for the heko there, well appreciated unforutnately its not working, when i log in now it just shows me the css template,rather than vringing me to adminSearch1.html, is the code right nw, just in case: <?php mysql_connect("sql6.hosting365.ie", "Search4_admin1", "clio172") or die(mysql_error()); mysql_select_db("Search4_mydatabase") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ID_my_site'])) { $username = $_COOKIE['username']; $pass = $_COOKIE['password']; $check = mysql_query("SELECT * FROM myadmin WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: submit.html"); } } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License Name : Pluralism Description: A two-column, fixed-width template fit for 1024x768 screen resolutions. Version : 1.0 Released : 20071218 --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Search4Trade</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper" style="width: 961px; height: 564px"> <div id="wrapper2"> <div id="header"> <div id="logo"> <h1><font size="6"> <a href="index.html">search4trade.net</a></font></h1> </div> <div id="menu"> <ul> <li></li> <li> <a href="Search1.html">Search </a></li> <li> <a href="Login1.php">Login</a></li> <li> <a href="phpBB2/index.php">Forum</a></li> <li> <a href="registration.html">Register</a></li> <li> <a href="comments.html">Star Rating</a></li> <li> <a href="contact.php">Contact</a></li> </ul> </div> </div> <div id="page"> <div id="content" style="width: 861px; height: 227px"> <div class="post"> <blockquote> <blockquote> <blockquote> <h2 class="title"><a href="#">Welcome to Search4Trade</a></h2> <blockquote> <div class="entry"> <?php //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('You did not fill in a required field.'); } // checks it against the database $check = mysql_query("SELECT * FROM myadmin WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('That adminstrator does not exist in our database.'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour); header("Location: 'adminSearch1.html'"); exit(); }}} else { // if they are not logged in ?> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="POST"> <blockquote> <table border="2" width="425" height="169" bgcolor="#FFFFFF"> <tr> <td colspan=2 bordercolorlight="#FFFFFF"> <h1 align="center">Admin Login</h1> </td> </tr> <tr> <td> <p align="center">Username:</td> <td> <p align="center"> <input type="text" name="username" maxlength="40" size="41"> </td> </tr> <tr> <td> <p align="center">Password:</td> <td> <p align="center"> <input type="password" name="pass" maxlength="50" size="41"> </td> </tr> <tr> <td colspan="2" align="right"> <p align="center" style="text-align: center"> <input type="submit" name="submit" value="Login" style="float: right"></td> </tr> </table> <p align="center"> </p> <p align="center"> <a href="http://www.dewalt.com"> <img border="0" src="images/dewalt-L.jpg" width="427" height="67"></a></p> </blockquote> </form> <?php } ?> </div> </blockquote> </blockquote> </blockquote> </blockquote> </div> </div> </div> </div> </div> <blockquote> <p align="center"> <span style="font-family: Angsana New;"> Copyright © Search4Trade.net 2008</span> </p> </blockquote> </body> </html>
  7. ok, can someone show me how to do this please im not really sure wat do to thanks guys
  8. but that code is at the top of the php script, can it go any higher? thanks again lads
  9. here it is, thanks guys! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License Name : Pluralism Description: A two-column, fixed-width template fit for 1024x768 screen resolutions. Version : 1.0 Released : 20071218 --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Search4Trade</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper" style="width: 961px; height: 564px"> <div id="wrapper2"> <div id="header"> <div id="logo"> <h1><font size="6"> <a href="index.html">search4trade.net</a></font></h1> </div> <div id="menu"> <ul> <li></li> <li> <a href="Search1.html">Search </a></li> <li> <a href="Login1.php">Login</a></li> <li> <a href="phpBB2/index.php">Forum</a></li> <li> <a href="registration.html">Register</a></li> <li> <a href="comments.html">Star Rating</a></li> <li> <a href="contact.php">Contact</a></li> </ul> </div> </div> <div id="page"> <div id="content" style="width: 861px; height: 227px"> <div class="post"> <blockquote> <blockquote> <blockquote> <h2 class="title"><a href="#">Welcome to Search4Trade</a></h2> <blockquote> <div class="entry"> <?php mysql_connect("") or die(mysql_error()); mysql_select_db("mydatabase") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ID_my_site'])) { $username = $_COOKIE['username']; $pass = $_COOKIE['password']; $check = mysql_query("SELECT * FROM myadmin WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: submit.html"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('You did not fill in a required field.'); } // checks it against the database $check = mysql_query("SELECT * FROM myadmin WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('That adminstrator does not exist in our database.'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour); header("Location: 'adminSearch1.html'"); exit(); }}} else { // if they are not logged in ?> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="POST"> <blockquote> <table border="2" width="425" height="169" bgcolor="#FFFFFF"> <tr> <td colspan=2 bordercolorlight="#FFFFFF"> <h1 align="center">Admin Login</h1> </td> </tr> <tr> <td> <p align="center">Username:</td> <td> <p align="center"> <input type="text" name="username" maxlength="40" size="41"> </td> </tr> <tr> <td> <p align="center">Password:</td> <td> <p align="center"> <input type="password" name="pass" maxlength="50" size="41"> </td> </tr> <tr> <td colspan="2" align="right"> <p align="center" style="text-align: center"> <input type="submit" name="submit" value="Login" style="float: right"></td> </tr> </table> <p align="center"> </p> <p align="center"> <a href="http://www.dewalt.com"> <img border="0" src="images/dewalt-L.jpg" width="427" height="67"></a></p> </blockquote> </form> <?php } ?> </div> </blockquote> </blockquote> </blockquote> </blockquote> </div> </div> </div> </div> </div> <blockquote> <p align="center"> <span style="font-family: Angsana New;"> Copyright © Search4Trade.net 2008</span> </p> </blockquote> </body> </html>
  10. thanks for that, but it ust does nothing, when i log in then, and i know that 'adminSearch1.html' is ok, and uploaded onto the server any ideas?
  11. hey guys hope everyone is keeping well i have a login in my website, and i want the login code to bring the user to a html page, however i used the php code: include 'adminSearch1.html'; and it opened adminSearch1.html' within the current page. how do i open adminSearch1.html independantly? thanks for the help Steve
  12. i was wondering if someone could tell me how to fit the new scc table code around my exsiting data to get a sexy table look this is the code for my table: <form method="post" action="postAdvReview.php" name="postAdvReview"> <table cellpadding="3" cellspacing="0" class="SaladFormTABLE" id="table1"> <tr> <td>Your Username</td> <td > <input type="text" name="username" value="" maxlength="10" size="10" locked="yes"> </td> </tr> <tr> <td>Tradesman's name: </td> <td><input type="text" name="name" value="" maxlength="10" size="10" > </td> </tr> <tr> <td >Type </td> <td ><input type="text" name="type" value="" maxlength="45" size="45" > </td> </tr> <tr> <td height="58">Rating (Out of 5)</td> <td height="58"><input type="text" name="StarRating" value="" maxlength="10" size="10" > </td> </tr> <tr> <td>Review Text </td> <td><textarea name="commentbox" cols="80" rows="6" ></textarea> </td> </tr> <tr> <td > </td> <td > </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="2" align="right"> <!-- BEGIN Button Update --><input name="Update" type="submit" value="Submit"><!-- END Button Update --> <!-- BEGIN Button Delete --><input name="Delete" type="reset" value="Reset"><!-- END Button Delete --> </td> </tr></table> </form>
  13. thanks for the link, but im trying to find out how i put this code in my php file? as in how i fit it around wats already there? thanks
  14. sorted! thanks for yer help! really appreciate it
  15. hey guys i have a big problem withone of all my text, everything is printing out in the bottom left hand corner as can be seen from the image: its only the text from the if statements that;s printing out there, any ideas what this might be. here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License Name : Pluralism Description: A two-column, fixed-width template fit for 1024x768 screen resolutions. Version : 1.0 Released : 20071218 --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Search4Trade</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper" style="width: 961px; height: 564px"> <div id="wrapper2"> <div id="header"> <div id="logo"> <h1><font size="6">search4trade.net</font></h1> </div> <div id="menu"> <ul style="line-height: 170%; text-align: justify; margin-left: 3em; margin-bottom: 1.5em"> <li><a href="Search1.html">Search </a></li> <li><a href="Login1.php">Login</a></li> <li><a href="#">Forum</a></li> <li><a href="registration.html">Register</a></li> <li><a href="adreview.html">Star Rating</a></li> <li><a href="#">Contact</a></li> </ul> </div> </div> <div id="page"> <div id="content" style="width: 766px; height: 205px"> <div class="post"> <div class="entry"> <p> </p> <p style="text-align: center"> </div> </div> </div> </div> </div> </div> <p style="text-align: center"> </p> </body> <?php //Database Information $dbhost = ""; $dbname = ""; $dbuser = ""; $dbpass = ""; //Connect to database mysql_connect( $dbhost, $dbuser, $dbpass) or die("Could not connect: ".mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $username = $_POST['username']; $type = $_POST['type']; $StarRating = $_POST['StarRating']; $commentbox = $_POST['commentbox']; $name = $_POST['name']; if(!$_POST['username']){echo 'You must supply a username! click your back button and try again.';exit();} $check = mysql_query("SELECT * FROM mytable WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('That username does not exist in our database.'); } if(!$_POST['name']){echo 'You must supply an name! click your back button and try again.';exit();} $check = mysql_query("SELECT * FROM mytable WHERE name = '".$_POST['name']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('That tradesman does not exist in our database.'); } if(!$_POST['type']){echo 'You must supply a type! click your back button and try again.';exit();} if(!$_POST['StarRating']){echo 'You must supply an StarRating! click your back button and try again.';exit();} if(!$_POST['commentbox']){echo 'You must supply a comment! click your back button and try again.';exit();} else { // use a query to insert the data into the database. $query = "INSERT INTO myreviews (username, type,StarRating, commentbox, name) VALUES('$username', '$type','$StarRating','$commentbox','$name')"; mysql_query($query) or die(mysql_error()); mysql_close(); echo "Thank you for your Contribution!"; } ?> </html>
  16. hey guys hope everyone is keeping well i have tables printing out in a horrbile bland manner, here take a look: there horrible, i need to make them much much more stylish, can anyone suggest a style to me, and a way of going about getting them to work! thanks for the help, Steve
  17. thanks for all the hlpe snatch got it worki, so delighted! thanks again!
  18. hey guys i have a table tat just goes right across teh page, like in the pic below: i want to have each textbox to appear on a seperate line under each other, i have tried to make this change with frontpage, but it cause my submit button to stop workin is there any simple php line of code that will make it go to the next line! heres teh table code: <form name="adminfrm" method="post" action="" > <table> <tr> <td>Name:</td><td><input type="text" name="txtName" value= '<?php echo $name; ?>' /></td> <td>Email:</td><td><input type="text" name="txtEmail" value= '<?php echo $email; ?>' /></td> <td>Username:</td><td><input type="text" name="txtUsername" value= '<?php echo $username; ?>' /></td> <td>Type:</td><td><input type="text" name="txtType" value= '<?php echo $type; ?>' /></td> <td>Location:</td><td><input type="text" name="txtLocation" value= '<?php echo $location; ?>' /></td> <td>Availability</td><td><input type="text" name="txtAvailability" value= '<?php echo $availability; ?>' /></td> <td>Map</td><td><input type="text" name="txtMap" value= '<?php echo $map; ?>' /></td> <td>StarRating</td><td><input type="text" name="txtStarRating" value= '<?php echo $starRating; ?>' /></td> <td><input type="submit" name="submit" value="Save Changes" /></td> </tr> </table> </form>
  19. im really not sure what to do, i sent u a message, did u get it?
  20. hey i want it to display all teh data from the table the setting of availability to 1111 or watever was ust a test to proove there was a connection. all i want to do is display all entries, all the user to edit the entries, and allow them to save those changes to the table by clicking update thats all i want it to do thanks very much for ur help again
  21. thanks for that, but it still not updating, any ideas?
  22. where does this go then, or what code does it replace? sorry for being so stupid! thanks again!
  23. \ o im sorry i forgot to mention that. $name = $_POST['name']; $email = $_POST['email']; $type = $_POST['type']; $location = $_POST['location']; $availability = $_POST['availability']; $username = $_POST['username']; $query = "INSERT INTO mytable (name, email,Type, location, availability, username) VALUES('$name', '$email','$type','$location','$availability','$username')"; mysql_query($query) or die(mysql_error()); mysql_close(); this is the code that is giving trouble, its lines 129-141 these lines are suppose to pull the data from teh textboxes and save the textbox entries to the database, while including all changes that the user might have made. but each time i click 'update' i just get a essage reading "update successfull" as coded by myself, but the table has not been updated when i check it, its still the same. thanks for ur help, it really means a lot.
  24. thats all of the code, it doesnt call anything from outsie outside that php file or that code i posted
  25. o sorry here it is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Design by Free CSS Templates http://www.freecsstemplates.org Released for free under a Creative Commons Attribution 2.5 License Name : Pluralism Description: A two-column, fixed-width template fit for 1024x768 screen resolutions. Version : 1.0 Released : 20071218 --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Search4Trade</title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="../../../Documents%20and%20Settings/Owner/Desktop/search4trade.net1.4/search4trade.net/style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper" style="width: 961px; height: 564px"> <div id="wrapper2"> <div id="header"> <div id="logo"> <h1><font size="6"> <a href="edit/search4trade.net/index.html">search4trade.net</a></font></h1> </div> <div id="menu"> <ul> <li></li> <li> <a href="Search1.html">Search </a></li> <li> <a href="Login1.php">Login</a></li> <li> <a href="phpBB2/index.php">Forum</a></li> <li> <a href="registration.html">Register</a></li> <li> <a href="adreviews111.html">Star Rating</a></li> <li> <a href="contact.php">Contact</a></li> </ul> </div> </div> <div id="page"> <div id="content" style="width: 861px; height: 227px"> <div class="post"> <blockquote> <blockquote> <blockquote> <h2 class="title"><a href="#">Welcome to Search4Trade</a></h2> <blockquote> <div class="entry"> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="POST"> <blockquote> <table border="2" width="425" height="169" bgcolor="#FFFFFF"> <tr> <?php $con = mysql_connect("localhost","root","clio172"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydatabase", $con); $result = mysql_query("SELECT * FROM mytable"); echo "<table border='1'> <tr> <th>Type</th> <th>Location</th> <th>Availability</th> <th>StarRating</th> <th>name</th> <th>email</th> <th>username</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo '<td><input type="text" value="' . $row['type'] . '"></td>'; echo '<td><input type="text" value="' . $row['location'] . '"></td>'; echo '<td><input type="text" value="' . $row['availability'] . '"></td>'; echo '<td><input type="text" value="' . $row['StarRating'] . '"></td>'; echo '<td><input type="text" value="' . $row['name'] . '"></td>'; echo '<td><input type="text" value="' . $row['email'] . '"></td>'; echo '<td><input type="text" value="' . $row['username'] . '"></td>'; echo "</tr>"; } mysql_close($con); ?> <?php if (isset($_POST['submit'])) { //Database Information $dbhost = "localhost"; $dbname = "mydatabase"; $dbuser = "root"; $dbpass = "clio172"; //Connect to database mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error()); mysql_select_db($dbname) or die(mysql_error()); mysql_query("UPDATE mytable SET availability = '1111111111' WHERE userid = '5'"); $name = $_POST['name']; $email = $_POST['email']; $type = $_POST['type']; $location = $_POST['location']; $availability = $_POST['availability']; $username = $_POST['username']; $query = "INSERT INTO mytable (name, email,Type, location, availability, username) VALUES('$name', '$email','$type','$location','$availability','$username')"; mysql_query($query) or die(mysql_error()); mysql_close(); echo "You have successfully Registered"; } ?> </tr> <tr> <td colspan="2" align="right"> <p align="center" style="text-align: center"> <input type="submit" name="submit" value="Login" style="float: right"></td> </tr> </table> </blockquote> </form> </div> </blockquote> </blockquote> </blockquote> </blockquote> </div> </div> </div> </div> </div> <blockquote> <p align="center"> <span style="font-family: Angsana New;"> Copyright © Search4Trade.net 2008</span> </p> </blockquote> </body> </html> thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.