Jump to content

gibigbig

Members
  • Posts

    125
  • Joined

  • Last visited

Everything posted by gibigbig

  1. none of the above suggestions seems to work
  2. yes i already know about that but wouldnt that mean i have to fit my entire template's code inside the "while" function? edit: btw its a joomla component so isn't there an already premade function for this?
  3. ok i need some help retrieving some data from my database. this is my database structure: id name author article_author article_date genre debut last release tags forum_id display description rating_given rating_total I would like to call on these table fields within my template using this format echo 'this is some random text '. $author .' and some more here '; can some one please help me
  4. ok the expected results are that when i go into index.php, i am supposed to see 2 boxes. whatever i type in both boxes should come up in the database under the fields "username" and "message" but for some reason, only "message" field gets filled when i chack in php my admin. here are my codes, canu tell me what i did wrong? mysql_connect.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- .connected {color:#FFFFFF; font-family:Arial, Helvetica, sans-serif; font-size:10px; background-color:#000000; padding:5px; border:thin #999999; } --> </style> </head> <body> <?php mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); echo "<div class='connected'>Connected to MySQL<br />Connected to Database</div>"; ?></body></html> index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form action="process.php" method="post"> <p> <input name="username" type="text" /> <p> <textarea name="message" cols="50" rows="10"></textarea><br /><input value="submit message" type="submit" /> </p> </form> </html> process.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body><?php include('mysql_connect.php'); ?> <?php $username = $_POST['username']; $message = $_POST['message']; mysql_query("INSERT INTO Users (username,message) VALUES ('$item','$message')"); echo"message added"; ?> </body> </html>
  5. the bg in the width:100% wasnt coming up but i got it working so never mind, thanks for asking though
  6. heres the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Webhoster.com l Serving The Internet For Years To Come</title> <style type="text/css"> <!-- .style1 {color: #FF0000}; .nav_bg { width:100%; height:175px; background-image:url(body.gif); } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .banner { width:300px; height:175px; background-image:url(header.gif); } .header_stuff { height:175px; width:100%; } --> </style> </head> <body> <div class="nav_bg"> <div class="header_stuff"><div class="banner"></div></div> </div> </body> </html> it works fine in IE but not in firefox can someone please explain why?
  7. ok i want to select a certain css file depending on the browser. the code works fine IE6 IE7 and all mozilla versions. but it has issues in safari? i dont know whats wrong here, can anyone help by suggesting a working code?
  8. can anyone help me understand the mootools framework, it will be a big help with my site, tnx www.mootools.net
  9. ok i have made a script that takes information from a form and adds it to a database. it then displays the data the that was placed into the form with the $_POST[''] function. however, i want it to read off the data that was placed into the form, add it to a database, then in another file ("process.php"), the data will be read STRAIGHT from the database and NOT from the POST function. can anyone help me, this is my code: <?php $con = mysql_connect("localhost","USERNAME","PASSWORD"); if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("DATABASE", $con);$sql="INSERT INTO registration (nickname, password, email) VALUES ('$_POST[nickname]','$_POST[password]','$_POST[email]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } $nickname = "$_POST[nickname]"; $password ="$_POST[password]"; $email = "$_POST[email]"; echo $nickname; mysql_close($con) ?><p>Welcome to narutoking </p> <table width="611" border="1" cellspacing="0" cellpadding="0"> <tr> <td>username</td> <td>password</td> <td>email</td> </tr> <tr> <td><?php echo $username ?></td> <td><?php echo $password ?></td> <td><?php echo $email ?></td> </tr> </table> <p> </p>
  10. no, it did select the database, just not the table. how does is the information stored if no TABLE in the database is specified inthe script? tnx
  11. ok since the script hasnt selcted a table in the database to input the data in, where does the information go then?
  12. <?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("my_db", $con);$sql="INSERT INTO person (FirstName, LastName, Age) VALUES ('$_POST[firstname]','$_POST[lastname]','$_POST[age]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added";mysql_close($con) ?>
  13. i have a login form and i would like to know how to connect it to a mysql database. no need for code, i just need the name of the fuctions and how to use it. ty
  14. the last echo statement is not used because i made it required through a javascript text field. if i remove he echo statement, will it fudge upt he code, seeing thats its in an if() function
  15. why did u use the \n" is this an escape fromthe quotes?
  16. yea sorry, i had an extra <?php tag betwwen my code and i now spotted it. yup im an noob trying to follow a tutorial. tnx for the code frost, thats exactly what i want
  17. sorry, still doesnt work, i dont know whats wrong
  18. i need to input a "nickname" a "email" and a "password" if the nickname is "admin" or "gibigbig" then i want it to show a certain text "hello admin to your site" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" name="form1" method="post" action="process.php"> <label> Nickname:<span id="sprytextfield3"> <input type="text" name="nickname" id="nickname" /> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> </label> <p>password:<label><span id="sprytextfield1"> <input type="password" name="password" id="password" /> <span class="textfieldRequiredMsg">Cannot be empty</span></span></label> </p> <p>email: <label><span id="sprytextfield2"> <input type="text" name="email" id="email" /> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></label> </p> <input type="submit" /> </form> <script type="text/javascript"> <!-- var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["change"]}); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "custom", {validateOn:["change"]}); //--> </script> </body> </html> i have the form and it works fine but i need a "process.php" to make the code work. i tried putting a code together here: <?php $nickname = $_POST['nickname']; $password = $_POST['password']; $email = $_POST ['email']; if $nickname='admin'; { echo"hello admin"}; else{ echo "hello ".$nickname."!"}; } ?> but it doesnt work, i also want to use an array to hold the words "admin' and "gibigbig" to display the "Hello admin, welcome to your site" can anyone help me out?
  19. o wow no wonder only the password was being displayed, tnx i'l change it now
  20. here is my html form code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action="process.php"> <label> Nickname: <input type="text" name="nichname" id="nichname" /> </label> <p>password: <label> <input type="password" name="password" id="password" /> </label> </p> <p>email: <label> <input type="text" name="emai" id="emai" /> </label> </p> <input type="submit" /> </form> </body> </html> and here is my process.php code : <?php $nickname = $_POST['nickname']; $password = $_POST['password']; $email = $_POST ['email']; echo "<h1> Thank you '$nickname' , </h1>"; echo" <br> Your password is '$password' and your email '$email' was will receive an email in a couple of minutes"; ?> please tell me what is wrong with it.
  21. hi, im having some trouble with my site: www.narutoking.com as u can see at the top, the banner is divided by dotted lines. i dont know which set of coding is resopnsible for this. please look at my header.php and styles.css below HEADER.PHP <?php print " <table height='229' cellSpacing='0' cellPadding='0' width='100%' border='0'> <tr> <td width=303 height=229> <table align=center width=100% border=0 cellspacing=0 cellpadding=0> <tr bgcolor=#0e0d15 align=center><td height=66><img src='".THEME."images/site-logo.gif' border=0></td> <tr><td height=1 background='".THEME."images/dotline.gif'></td> <tr><td height=117 background='".THEME."images/vw_1.jpg'></td> <tr><td height=1 background='".THEME."images/dotline.gif'></td> <tr bgcolor=#2f2e33 align=center><td height=44></td> </table> </td> <td width=1 height=229 background='".THEME."images/topl.jpg'></td> <td width=150 height=229 bgcolor=#0e0d15> <table align=center width=100% border=0 cellspacing=0 cellpadding=0> <tr align=center><td height=184 background='".THEME."images/vw.jpg'></td> <tr><td height=1 background='".THEME."images/dotline.gif'></td> <tr align=center bgcolor=#0e0d15><td height=44><img src='".THEME."images/jetta.gif'></td> </table> </td> <td width=1 height=229 background='".THEME."images/topl.jpg'></td> <td width=415><img src='".THEME."images/logo.jpg' width='415' height='229'><br></td> </tr> </table> "; ?> STYLE.CSS body { font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:10px; padding:0px 0px 0px 0px; margin:0px 0px 0px 0px; background-image: url('images/bkg.gif'); background-attachment: fixed; scrollbar-3dlight-color:#3f3f3f; scrollbar-arrow-color:#666666; scrollbar-darkshadow-color:#3f3f3f; scrollbar-face-color:#3f3f3f; scrollbar-highlight-color:#3f3f3f; scrollbar-shadow-color:#3f3f3f2; scrollbar-track-color:#666666; } /* General page style */ .bodyline {background: #525157;color:#000000;border:0px solid #000000;} a {color:#000000; text-decoration:none;} a:hover {color:#000000; text-decoration:underline;} a.side {color:#000000; text-decoration:none;} a:hover.side {color:#000000; text-decoration:underline;} a.white {color:#000000; text-decoration:none;} a:hover.white {color:#000000; text-decoration:underline;} a.category:link {font: 11px arial; color: #FFFFFF; height:11px;white-space:nowrap; text-decoration: none; font-weight:bold} a.category:active {font: 11px arial; color: #FFFFFF; height:11px;white-space:nowrap; text-decoration: none; font-weight:bold} a.category:visited {font: 11px arial; color: #FFFFFF; height:11px;white-space:nowrap; text-decoration: none; font-weight:bold} a.category:hover {font: 11px arial; color: #efefef; height:11px;white-space:nowrap; text-decoration: none; font-weight:bold} form {margin:0px 0px 0px 0px;} hr {border-top: 1px solid #000000; border-bottom: 1px solid #B4C7B0; background-color: transparent; height: 2px;width: 100%;} hr.side-hr {border-top: 1px solid #000000; border-bottom: 1px solid #E0E3E8; background-color: transparent; height: 2px;width: 100%;} td {font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:10px;} pre {font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:9px;} .alt {color:#1C1C1C;} .white-header {font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:10px; color:#000000;background-color:#525157; padding:4px; border-top:#000000 1px solid; border-bottom:#000000 1px solid;} td.cpic {background-color: none; background-image: url(images/cell.gif);} .full-header {font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:10px; color:#111;background-color:#62784C;} .button {background:#efefef;color: #000000; font: bold 10px Verdana, Arial, Helvetica, sans-serif; border-top: solid #BFBFBF; border-top-width: 1px; border-left: solid #BFBFBF; border-left-width: 1px; border-right: solid #FFFFFF; border-right-width: 1px; border-bottom: solid #FFFFFF; border-bottom-width: 1px;} .textbox {background-color:#e5e5e5;color: #000000; font: normal 10px Verdana, Arial, Helvetica, sans-serif; border-top: solid #BFBFBF; border-top-width: 1px; border-left: solid #BFBFBF; border-left-width: 1px; border-right: solid #FFFFFF; border-right-width: 1px; border-bottom: solid #FFFFFF; border-bottom-width: 1px;} .visits {color:#506232; text-decoration:none; FONT-WEIGHT: bold;font-size:10px;} .main-body {font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:11px; color:#000000; background-image: url('images/box-bg.gif'); padding:3px 4px 3px 4px;} .side-body {background-color:#c4c4c4; font-size:10px; color:#0C1500; padding:4px 4px 6px 4px;} .main-bg {background-color:#525157;} .border {border-width:0px 1px 1px 1px;border-color:#000000;border-style:solid;} .border1 {border-width:1px 1px 1px 1px;border-color:#000000;border-style:solid;} .news-footer {font-size:10px;font-weight:normal; color:#000000; background-color:#c4c4c4; padding:4px 4px 4px 4px;} .capmain {font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:10px;font-weight:bold; border-width:1px 1px 1px 1px;border-color:#000000;border-style:solid; color:#FFFDF0; height:22px; padding:2px 2px 2px 2px;} .copyrights {background: none; COLOR: #FFFDF0; FONT-SIZE: 10px; FONT-WEIGHT: normal; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none} .title {BACKGROUND: none; COLOR: #f1f1f1; FONT-SIZE: 11px; FONT-WEIGHT: bold; FONT-FAMILY: Tahoma, Verdana, Helvetica; TEXT-DECORATION: none} .block-title {BACKGROUND: none; COLOR: #f1f1f1; FONT-SIZE: 10px; FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica} .block-news {BACKGROUND: none; COLOR: #f1f1f1; FONT-SIZE: 10px; FONT-WEIGHT: bold; height:14px;white-space:nowrap; FONT-FAMILY: Verdana, Helvetica} .head-title {background: none; COLOR: #f1f1f1; FONT-SIZE: 10px; FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none} .date {background: none; COLOR: #f1f1f1; FONT-SIZE: 10px; FONT-WEIGHT: bold; FONT-FAMILY: Verdana, Helvetica; TEXT-DECORATION: none} img {border: 0px;} .capleft {width:2px;height:20px;} .capright {width:2px;height:20px;} .scapmain {font-family:Verdana,Tahoma,Arial,Sans-Serif; font-size:10px;font-weight:bold; color:#000; height:19px; padding:0px 2px 0px 2px; border-width:1px 0px 1px 0px;border-color:#000000 #000000 #000000 #000000;border-style:solid;} .tbl-border {background-color:#000000;} .tbl {font-size:11px; padding:3px 4px 3px 4px;} .tbl1 {font-size:11px; color:#f1f1f1; background-color:#525157; padding:4px;} .tbl2 {font-size:11px; color:#f1f1f1; background-color:#666666; padding:4px;} /* Forum header*/ .forum-caption {font-size:10px;font-weight:bold; color:#f1f1f1;background-color:#525157; height:27px; padding:2px 4px 2px 4px; background-image:url(images/cell.gif);background-repeat:repeat-x;border-width:0px 0px 0px 0px;border-color:#000000 #000000 #000000 #000000;border-style:solid;} /* Quote blocks */ .quote {color:#4E4E4E;background-color:#FAFAFA; padding:2px; margin:0px 20px 0px 20px; border:1px #000000 solid;} /* Voting Poll */ .poll {height:12px; border:1px #47613D solid;} .comment-name {font-weight:bold; color:#506481;} /* This is for the Shoutbox */ .shoutboxname {font-weight:bold; color:#345302;} .shoutbox {color:#06070A;} .shoutboxdate {font-size:9px; color:#1C1C1C;} .shoutboxhelp {font-size:9px; color:#575757; text-align:right;} .small {font-size:11px; font-weight:normal;} .small2 {font-size:10px; font-weight:normal; color:#1C1C1C;} .side-small {font-size:9px; font-weight:normal; color:#111111;} .side-label {background-color:none; font-weight:normal; color:#3E5D0B; padding:2px;} /* This is for the Photo Gallery */ .gallery {padding: 16px 0px 8px 0px;} .gallery img {border: 1px solid #000000; filter: gray;} .gallery:hover img {border: 1px solid #3E5D0B; filter: none;} img.activegallery {border: 1px solid #000000; filter: none;} please tell my which code makes these dotted lines, thanks!
  22. thats really kool, and it will save me alot of time too. wow thanks guys. u really helped me out here. quick ques though. is this site COMPLETELY customizable through a CMS?
  23. k, i'm uploading it now. thanx can u explain exactly what is a CMS. i dont really get the guide they gave in the zip file
  24. i've been on the internet for a couple of hours now and im really fustrated. I'm looking for a script that has a customizable login/register/logout form with complete user management [private messaging, profile edits, avatars] and all i end up with is some basic login scripts. All the ones that has all the features I want comes with extra features like paypal chequing and accounting and costs over $20. can anyone help me out here and reference a god, free script with these features? thanks, .::gibigbig::.
×
×
  • 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.