Jump to content

zeem

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

zeem's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. a legitamit problem? wat makes htis less lagit than anyothe problem????????? HMMMMM?? just kididng, i did use ur method, of cut an pasteing out of a query thats y i was having such a hard time understanding my the error?
  2. here is my 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 'order (name,cid,color,size) VALUES ('767','1','blue', '11')' at line 1 so i asume that its a syntax errory here is the code in question $size=$_POST['size']; $color=$_POST['color']; $name=$_POST['order']; $cid = "1"; $connection = mysql_connect('localhost','localhost','') or die ('Connection issue'); mysql_select_db('archive') or die('database issue'); $query = "INSERT INTO order (name,cid,color,size) VALUES ('$name','$cid','$color', '$size')"; $result= mysql_query($query) or die("fuck : $query" . mysql_error()) ; see anythying wrong? i dont
  3. OK wat i have so far is a table that is linked to the mysql database 'Archive'. the php runs down the table 'inventory' printing out the items in the column 'Name'. i also have a little check box next to each row in the table(in the html). wat i want to do is have the useer click the check box, and hit submit. it then goes to the shoping cart were the item that was checked is displayed, along with its price and and the subtotal and the total, with tax. the issue i am having is that the value of the checkbox is a variable, not somehign like 'shoe', but rather the '$shoe' that was taken from the mysql table. so wat i would do is output there discision to a different table order, from which the shopping cart will pull its data. this is all so that if i add a new inventory item, it will autamaticaly display the item and work with out me having to change the code. i just had the idea, while typing this that it would be <input type=checkbox value=<?echo $shoe?> name ='shoe'> im new to this so i have some trouble with explaining...i think thats readable. z im gonna test that. is that it, or is there a better way?
  4. hmmm ok...but that exact varialbe corrisponds to the populated table, pulled from mysql database. i cant make it shoe[] because $shoe is that shoe thats in the table, thats just been inputed.
  5. OH you got me, i read the article. some helpful stuff there. fixed some things but this is my main concern, i have an input secion <input type=checkbox name =<?echo $shoe?>> now im useing a variable because what i did was populate the page with sql/php. i used the whole $connection stuff. how do i translate that variable to a new page? i have the checkbox, you click submit, the new name for that check box depends on what item the person wanted and the new page will show wat they checked. should i not use $shoe for the name of the input? cause when i use it, it doesnt show anythign. and im sorry for snaping, i did take a bit defense, but man this arizona green tea energy drink taste HORIBLE
  6. well thats very helpful, very helpful indeed. i may be too young for php, but that is besides the point. i ran through the tutorial, went to a few websites, did that whole thing. even finished a book "How to do eveything with PHP & MYSQL" by i think "Vikram Vaswani". im just a kid tryign to learn; and instead of spending hours searching through these forums and other websites, i could also ask for help from some people here. if you think im a loser and shouldnt post here, thats your perogative. but dont post and proclaim how im too young and shouldnt bother the grown ups with such easy questions, when im sure you were in my position before. And i know im not a nuscence cause searching down the forums, there are some that i could answer, you know me being to young and all, so i know you guys dont hate people who are "noobies" at programing. but if you feel i should leave and never return, thats fine. but does anyone have an real answers that might help me?
  7. k i understand that...is there a way that when i click the submit button, all the items on the form that are checked are submited to the table in my database called ORDER?
  8. is that the submit button i have? at the bottom? how would i do that?
  9. how much power does <form ACTION= > have? is it only for sending the form somewere? or can i use that to acess a server? like i have a table of variable items, i check the ones i want and click my submit button, can i use the action sub tag to access mysql database and input them in there? z
  10. zeem

    .dat help

    oh darn, nevermind, your right...wow thats a lot simpler than i thot it would be...damn thanks tho z
  11. zeem

    .dat help

    Nothing. that wont work cause $file is a variable. i need to add .dat onto the end of $variableaddress, saving it into $file...i would assum, if there is an easier way to do this i would be thrilled z
  12. zeem

    .dat help

    Ok heres wat i have: I Have a mysql table that outputs to my webpage. I also have several .dat files, which correspond to the cells in the sql table that i want to be shown in an HTML table. I want each html table cell to have the .dat folder. how do i make a varialbe address? in case that doesnt make sence, which im sure it doesnt and so on and so on
  13. $adr is the adress of the person, and $sadr is the shipping address. If $sadr is blank, it woudl be set to $adr
  14. ive been trying to make a for that you can enter ur billing information, and if its different from the shipping , it will show it. like any type of orderform. this is a snipit of my code: <p><?php echo $city?> <P><h3>Billing Address<font size=1>(if different from above)</font>*</h3></p> <?php $_POST["sadr"]; if (sadr == ""){ $sadr = $adr; $scity = $city; $sstate = $state; $szip = $zip; $scountry = $country; $sdphone = $dphone; $sephone = $ephone; echo "Address:". $sadr; echo "City:". $scity; echo "State:".$sstate; echo "Zip Code:".$szip; echo "Day Phone(with area code 4011234567):".$sdphone; echo "Evening Phone:".$ephone; } else{ $_POST["sadr"]; $_POST["scity"]; $_POST["sstate"]; $_POST["szip"]; $_POST["sdphone"]; $_POST["sephone"]; } $_POST["note"]; ?> <p> Address: <?php echo $sadr;?> <p> City: <?php echo $scity;?> <p> State: <?php echo $sstate;?> <p> Zip : <?php echo $szip;?> <p> Day Phone <?php echo $dphone;?> <p> Evening Phone <?php echo $ephone;?> <p> Note: <?php echo $note?> i am asuming that my method of getting variables is off. I used $_post to get them, was that wrong?
×
×
  • 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.