Jump to content

frostyhorse

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

frostyhorse's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I changed that and am no getting an error, "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 'WHERE id='Blue Falcon W', AND name=''' at line 2" I put in '3' for the ID, 'Blue Falcon W' for the name, and 'yes' for the stud, which I want to update.
  2. For my project, I need to let members update multiple fields at once. There's a total of four fields that I want them to be able to update on their own free will. This is what I have started on: <? session_name('usersession'); session_start(); ?> <html> <head> <title>Equine Revolution's Equine Registry</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <center> <table id="main"> <tr><td> <p><h1>Update A Horse</h1> <? if(!isset($peacock)) { include('menu2.php'); include('loginform.php'); exit(); } else { include('menu1.php'); echo ' <p> <form action="update2.php" method="post"> Horse Id: <input type="text" name="id" /><br> Horse Name: <input type="text" name="id" /><br> For Stud: <input type="text" name="stud" /> <br> <input type="submit" /> </form> </p>'; } ?> <p> <? include('foot.php'); ?> </p> </td></tr> <tr><td></td></tr> </table> </center> </body> </html> Right now they -should- be able to say yes, this stallion can breed or no, this stallion cannot breed. I know how to add in the other fields for breeding information, for sale or not, and sale information. This is what I have written for the update2.php page: <?php $con = mysql_connect("fdb2.awardspace.com","erregistry_db","carmengj99"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("erregistry_db"); $sql="UPDATE registry SET stud='$_POST['stud'], WHERE id='$_POST['id'], AND name='$_POST['name'],"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Horse has been updated."; mysql_close($con) ?> <a href="update.php">Update Another Horse</a> Right now I get this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/www/erregistry.awardspace.us/update2.php on line 10 and not exactly sure what it is... =/ I first need help fixing the error and the writing it so the three other fields mentioned above can be updated, too.
  3. <? session_name('usersession'); session_start(); include ('db1.php'); $query = "SELECT * FROM registry WHERE owner='$user' ORDER BY id "; $result = mysql_query($query) or die(mysql_error()); ?> <html> <head> <title>Equine Revolution's Equine Registry</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <center> <table id="main"> <tr><td> <p><h1>My Horses</h1> <br> <? if(!isset($peacock)) { include('menu2.php'); include('loginform.php'); exit(); } else { include('menu1.php'); echo '<br />'; while($row= mysql_fetch_array($result)) { $id = $row[id]; $name = $row[name]; $age = $row[age]; $breed = $row[breed]; $color = $row[color]; $gender = $row[gender]; echo $id . "<a href='view.php?id=$id'>$name</a>" . $age . $color . $breed . $gender . "<br> />"; } ?> </p> <p> <? include('foot.php'); ?> </p> </td></tr> <tr><td></td></tr> </table> </center> </body> </html> That's the newest version of the code. I put it in and it says 'unexpected $end on line 65'. I counted down. There is no line 65.
  4. I removed this part "<br> />"; and now the error has changed from the unexpected ending to: Parse error: syntax error, unexpected T_ECHO in /home/www/erregistry.awardspace.us/myhorses.php on line 49. >.<
  5. OK. I changed it to that but I noticed breaks after each line. I want it to be one continue line, with a break at the end, after the "gender" only. So it now reads: <? session_name('usersession'); session_start(); include ('db1.php'); $query = "SELECT * FROM registry WHERE owner='$user' ORDER BY id "; $result = mysql_query($query) or die(mysql_error()); ?> <html> <head> <title>Equine Revolution's Equine Registry</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <center> <table id="main"> <tr><td> <p><h1>My Horses</h1> <br> <? if(!isset($peacock)) { include('menu2.php'); include('loginform.php'); exit(); } else { include('menu1.php'); echo '<br /'; while($row= mysql_fetch_array($result)) { $id = $row[id]; $name = $row[name]; $age = $row[age]; $breed = $row[breed]; $color = $row[color]; $gender = $row[gender]; echo $id . "<a href='view.php?id=$id'>$name</a><br />"; echo $age . "<br />"; echo $color . "<br />"; echo $breed . "<br />"; echo $gender . "<br> />"; } ?> </p> <p> <? include('foot.php'); ?> </p> </td></tr> <tr><td></td></tr> </table> </center> </body> </html> and I get an unexpected $end error on line 70. Parse error: syntax error, unexpected $end in /home/www/erregistry.awardspace.us/myhorses.php on line 70
  6. Ok, I removed the ' from Sire's and now it's working Thanks. I also have this page: <? session_name('usersession'); session_start(); include ('db1.php'); $query = "SELECT * FROM registry WHERE owner='$user' ORDER BY id "; $result = mysql_query($query) or die(mysql_error()); ?> <html> <head> <title>Equine Revolution's Equine Registry</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <center> <table id="main"> <tr><td> <p><h1>My Horses</h1> <br> <? if(!isset($peacock)) { include('menu2.php'); include('loginform.php'); exit(); } else { include('menu1.php'); echo '<br> <? while($row= mysql_fetch_array($result)) { $id = $row[id]; $name = $row[name]; $age = $row[age]; $breed = $row[breed]; $color = $row[color]; $gender = $row[gender]; ?> <? echo $id ?> <a href= 'view.php?id=<? echo $id ?>'><? echo $name ?> </a> <? echo $age ?> <? echo $color ?> <? echo $breed ?> <? echo $gender ?> <br> <?}?> '} ?> </p> <p> <? include('foot.php'); ?> </p> </td></tr> <tr><td></td></tr> </table> </center> </body> </html> and it comes up with the same Parse error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/www/erregistry.awardspace.us/myhorses.php on line 49
  7. I copied and pasted ReKoNiZe's code and that didn't fix the problem. The same error, this time on line 39.
  8. Here is the updated code that I fixed: <? session_name('usersession'); session_start(); ?> <html> <head> <title>Equine Revolution's Equine Registry</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <center> <table id="main"> <tr><td> <p><h1>Register A Horse</h1> <? if(!isset($peacock)) { include('menu2.php'); include('loginform.php'); exit(); } else { include('menu1.php'); echo ' <p> <form action='insert.php' method='post'> Name: <input type='text' name='name' /> <br> Age: <input type='text' name='age' /> <br> Breed: <input type='text' name='breed' /> <br> Color: <input type='text' name='color' /> <br> Height: <input type='text' name='height' /> <br> Gender: <input type='text' name='gender' /> <br> Sire: <input type='text' name='sire' /> <br> Sire's Sire: <input type='text' name='siresire' /> <br> Sire's Dam: <input type='text' name='siredam' /> <br> Dam: <input type='text' name='dam' /> <br> Dam's Sire: <input type='text' name='damsire' /> <br> Dam's Dam: <input type='text' name='damdam' /> <br> Owner: <input type='text' name='owner' /> <br> Origins: <input type='text' name='origins' /> <br> Type: <input type='text' name='type' /> <br> <input type='submit' /> </form> </p>'; } ?> <p> <? include('foot.php'); ?> </p> </td></tr> <tr><td></td></tr> </table> </center> </body> </html> And I'm still getting the same error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/www/erregistry.awardspace.us/register.php on line 31
  9. <? session_name('usersession'); session_start(); ?> <html> <head> <title>Equine Revolution's Equine Registry</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <center> <table id="main"> <tr><td> <p><h1>Register A Horse</h1> <? if(!isset($peacock)) { include('menu2.php'); include('loginform.php'); exit(); } else { include('menu1.php'); echo " <p> <form action="insert.php" method="post"> Name: <input type="text" name="name" /> <br> Age: <input type="text" name="age" /> <br> Breed: <input type="text" name="breed" /> <br> Color: <input type="text" name="color" /> <br> Height: <input type="text" name="height" /> <br> Gender: <input type="text" name="gender" /> <br> Sire: <input type="text" name="sire" /> <br> Sire's Sire: <input type="text" name="siresire" /> <br> Sire's Dam: <input type="text" name="siredam" /> <br> Dam: <input type="text" name="dam" /> <br> Dam's Sire: <input type="text" name="damsire" /> <br> Dam's Dam: <input type="text" name="damdam" /> <br> Owner: <input type="text" name="owner" /> <br> Origins: <input type="text" name="origins" /> <br> Type: <input type="text" name="type" /> <br> <input type="submit" /> </form> </p>; } ?> <p> <? include('foot.php'); ?> </p> </td></tr> <tr><td></td></tr> </table> </center> </body> </html> Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/www/erregistry.awardspace.us/register.php on line 31
  10. Well... A friend has gotten me this far and I would like to clean up this page and finish it. What I am trying to do is have a nice, orderly line up of information on a page, such as the one displayed here: http://championsbidranch.awardspace.com/studrow.php The page that I am currently working on is here: http://championsbidranch.awardspace.com/testshow.php Now, the first so many pictures are unorderly, and I cannot figure out why. I think it is my database, or it might be my PHP coding. I do not know for sure, and would like that figured out. The coding to the second page is below: <table width= "100%" border= "0" cellpadding= "2" align= "center"> <?php include ('db1.php'); $query = "SELECT * FROM horses WHERE category='show' ORDER BY name"; $result = mysql_query($query) or die(mysql_error()); ?> </table> <html> <head> <title>Champion's Bid Ranch ... It's Not Just A Name. It's What We Do.</title> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body> <div id="menu"> <img src="http://championsbidranch.awardspace.com/menu.jpg" usemap="#Map" border="0"> <map name="Map"> <area shape="poly" coords="0,26,25,164,171,146,145,2" href="http://championsbidranch.awardspace.com/index.php"> <area shape="poly" coords="28,154,2,298,143,324,171,180" href="http://championsbidranch.awardspace.com/studrow.php"> <area shape="poly" coords="172,455,32,480,0,336,146,310" href="http://championsbidranch.awardspace.com/mares.php"> <area shape="poly" coords="144,635,-1,613,26,468,171,493" href="http://championsbidranch.awardspace.com/showstring.php"> <area shape="poly" coords="1,654,143,627,172,771,28,799" href="http://championsbidranch.awardspace.com/office.php"> </map> </div> <div id="img"> <img src="http://championsbidranch.awardspace.com/banner.jpg"></div> <div id="content"> <b>Champion's Bid Ranch || </b> <br><br> <center> <table width="98%" border="0" cellpadding="0" cellspacing="1"> <? while($row= mysql_fetch_array($result)) { $id = $row['id']; $name = $row['name']; $age = $row['age']; $breed = $row['breed']; $color = $row['color']; $pattern = $row['pattern']; $height = $row['height']; $gender = $row['gender']; $sire = $row['sire']; $dam = $row['dam']; $dam_sire = $row['dam_sire']; $training = $row['training']; $level = $row['level']; $picture = $row['picture']; ?> <tr><td colspan="2"><h2><? echo $name; ?> </a></h2></td></tr> <tr><td><img src="http://i197.photobucket.com/albums/aa58/ShellyDominik/BITS/noimage.jpg"></td> <td><? echo $age; ?> <? echo $color; ?> <? echo $pattern; ?> <? echo $breed; ?> <? echo $gender; ?> <br> Sired by <? echo $sire; ?> from <? echo $dam; ?> </td></tr> </table> <? } ?> <br><br> <font size="1"><i>This is a fictional stables. Horses and services are fictional and are not in any way real life horses or services. Website design and manipulation is copyrighted to Shelly, the owner of the website. Email is frostyhorse_1992@yahoo.com</font></i> <br><br> </div> </td></tr> </table> Can anyone help? Thanks!
  11. OK I looked over the validate script I was given and changed the page url and it worked. BUT now Im coming up with these errors: and the code from bank_deposit.php: EDIT; After examining some other files with related errors, they all have the MYSQL_ASSOC in common. Any ideas?
  12. The problem is I go to create an account, that works. I go to log in, and then it takes me to the server page. I dont know exactly which code to show, so I cant exactly do that. and i cant contact the coder because she's gone.
×
×
  • 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.