Jump to content

YoungNate_Black_coder

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

Everything posted by YoungNate_Black_coder

  1. Notice: Undefined index: Passsword in /home/yukikoco/public_html/fsns/Logged.php on line 133 Password: Please click here to go back! this come from using a varible in your script before storing it ! nice layout thought! u must be a killer with css5 / jquery
  2. never had a to many column error did u try to get them with fetch array and then explode them ?
  3. // wrong function ... $row = mysql_fetch_array($result); // u are asking for a interger with fetch array // do this instead $row= mysql_fetch_assoc($result); // u want to fetch a associtive array! and get all row values assocated with the query condition ... you have to read betwwen the lines when trying to learn a simple langauge like php u kno assocative array what is it assocaited with maybe the query!
  4. first off this is a php help forum there is a javascript help in a another section cause thats a java problem not php but im not the best with jquery but a lil peace of advice jquery controls divs so u should be using ajax to talk to your php script bacuse java scripts dnt pass through php i dnt think they do my site does what u are trying to do but its a ajax xhtml request .... so my advice to you is ask around in the jquery / ajax / java section cause from the look of your code php is doing its job!
  5. walk in the park ........... <?php do { ?> <a href="page.php?whateveruwant=<?php echo $row_page['id']; ?>">page titles (use a row value for this as well)</a> <?php } while ($row_page = mysql_fetch_assoc($what ever u used as your query identifire )); $rows = mysql_num_rows($row_page); if($rows > 0) { mysql_data_seek($what ever u used as your query identifire, 0); $row_males = mysql_fetch_assoc($what ever u used as your query identifire); } ?> ////////////
  6. DIDNT UNDERSTAND that one but i can be more specific i guess... example: <?php // $_POST['MALE'] would look like this with the test snake im using: $male = $_POST['MALE'] = "/co/pastel/albino/piedball"; // i added those slashes (/) to use as an explode delimiter so if u explode u get this $ats = explode("/",$male); // after explosoin (Kaboom!!!!!) Now Its an array (co) (pastel) (albino) (piedball) // foreach statment comes into play 2 ad a controller varible (hope i used that statment right lol! "control varible") foreach($ats as $key=>$ats){ // now the first to are easy i can just write an if statment for those guys cause if($key == 1){ // have to say exacly equal to zero cause foreach stores a blank value with the zero key(dnt kno why ) and beacuse im in a loop it would go to the next if i would have used(if($key>0)) // anyway the first key key 1 is a representation of the genetic background exp. (co) or short for coDominant // so i stor that into a varible $gb = $ats; // now the second if statment says the following because again i just need the next varible (pastel) which is the base color/pattern mutation( im not loosing u am i ? ) if($key == 2){ $base = $ats; } // now her is where that php heffer i usta love gets tricky lol! // the following $ats varibles are considered hets as to thats how they were posted on my database and looped into a select list... // so heres wherre i hit the way i dnt kno how many traits the snake is het for i want to store all the following traits into varibles that the function can comunicate with something like this: (if this is allowed)... if($key >2 ){ $hets = array(); $hets[] = $ats; // but that doesnt work !!!!! :'( // now i kno a vetran coder would say implode or list but u must kno whats in the array to list and implode will just put whats left of the array backinto one which i dnt need so to ask the question again .... [b]how do i store the rest of that exploded array into varlbes so i can use them in my next function? [/b] } } ?> lol, is that clear enough , thanks for your help buddie!!
  7. well sounds to me like your thinking of some kind of template system which is what i do with all my sites! one way u could go about doing that is making a layout in photoshop of what u want the site to look like and get it layed out in dreamweaver / whatever u use and then just query your database for row data that will populate information into your divs... as far as the dynamic url goes that simply as u put it ...... pass a vairlbe through the url so that u can use that to query with like so : start with a simple page (im assuming you already have some type of way u plan to create dynamic links right??..) <?php // query your database for all the items // then store them into rows like this //$row_data[''] // then plug them in the links ull have like so: <html> <body> <a href="shoping.php?item=<? php echo $row_data['id'] ?>">link to a item</a> </body> </html> // no when those links are click : say for example the url said 1 site.com/shoping.php?item=1 that one reprsents $ID = $_Get['[b]item[/b]'] // witch would be 1 then query your database with that one example: $sql = SELECT * FROM ITEMS WHERE ITEMS_ID = '$ID'; THEN STORE THOSE INTO MYSQL ROWS AND PLUG THEM IN WHERE U WANT ON YOUR SITE ... HOPE THIS HELPS ///////////////// U have been struck by Young Nate Da Great The Top Black CODER!/////////////////
  8. say! if u want help u need to post some code! but sounds like a div class error beacuse ie9 is just as well swung as chrome. paste the full code of that page and i might be able to help u!
  9. hah ari gold one funny comedian welcome to the forum i just started like it fast help if u need it!
  10. thanks buddy glad to see i could get some real help!!!! okay i will try the implode function . but i was trying to get them into varibles so i could test them against the game like forinstance if u have a clue about how ball pythons breeding work then u would understand like example: male would eqaul : Co/pastel/albino/piedball where (co) equals the base morphs background and the 2 trait will equal the base morph (pastel) and evrything after comes from the row of the datbase what snake is het for (albino) / (piedball): problem is i wont kno what all the snake is het for????? so i made it so a snake can only be het for 5 traits...... witch mean the array would look something like this // $MALE IS WHATEVER THE SNAKES ATRIBUTES ARE : like Co/pastel/albino/piedball $MALE = $_POST['MALE'] // so i $at = explode ("/"$male); //and did this: // wrote an array for counting $stat = array; foreach($at as $key=>$att){ // i want to write a varible for each stat like $stat[] = $att; } but u cant echo $stat u would just get array and i kno i could just echo in the loop but im not trying to echo i just want to kno if $stat will hold each trait like this: $stat[] = "co"; $stat[] = "pastel"; $stat[] = "albino"; $stat[] = "piedball"; ///?????? but obvisuly u cant do that but i wanna kno how u go about doing that cause evan after implode u still dnt get what im looking for ???? u digg?
  11. okay my data comes from a form if(!isset($_POST['male'])){ $errors[] = "You Must Select A male to breed!" ;} //check if a female was speciefied if(!isset($_POST['female'])){ $errors[] = "You Must Select A female to breed!" ;} $male = $_POST['MALE']; $female = $_POST['feMALE']; // explode the male name so we can see if its het for anything $atribute = explode("/",$male); // this should give me exp. (co) (pastel) (albino) (piedball) $het = array(); foreach($atribute as $key=>$atribute){ if($key == 1){ // this stores the snakes genetic background $gene_type = "$atribute"; } if($key == 2){ // this stores the snakes base morph $morph = "$atribute"; } if($key >2){ // this is where i need help // the snake could have anywhere from 1-5 het traits i need for $het[] = $atribute to be stored into single varbles that i can use to continue my code for my breed function ................. ($het[] = "$atribute" ) can not be echo and get each value .... all i get is array.... } } basiclly its just like that site pythonkings.nl but i dnt have a breed function yet im stuck ........ and thats whats stopping my launch for the site......
  12. header('location: page.php') ; //note headers have to be sent before any html tags
  13. thanks, for your help ... but i am no getting array prented on the screen... my source looks like this like this // explode the male name so we can see if its het for anything $atribute = explode("/",$male); // this should give me exp. (co) (pastel) (albino) (piedball) $het = array(); foreach($atribute as $key=>$atribute){ if($key == 1){ // this sotres the snakes genetic background $gene_type = "$atribute"; } if($key == 2){ // this sotres the snakes base morph $morph = "$atribute"; } if($key >2){ $het[] = "$atribute"; } } $numb_hets = count($het); // ooooooooooooooooooooooow!!!!! if($numb_hets == 0){ // co / dom / rec $gene_type; // base morph $morph; /// not het $hets = "no"; // check what they Gentic back ground is.... if($gene_type == "co"){ $what = "Codominant"; }elseif($gene_type == "dom"){ $what = "Dominant"; }elseif($gene_type == "rec"){ $what = "Reccesive"; }elseif($gene_type == "wild"){ $what = "Wild Type "; } echo " <table><tr><td><u>Background</u></td><td><u>Morph</u></td><td><u>Hets.....</u></td></tr> <tr><td><u>$what</u></td><td><u>$morph</u></td><td><u><pre>"; print_r($het); echo "</pre></u></td></tr> </table> "; // end of function }
  14. i always encrypt with md5 !!!!! but i also store a rand(10000,99999) on the back end in a hidden feild when a user sign up and pass it along incase there is a javascript that can dycrypt md5 u can never be to careful ! // that os assuming u are talking about a login script.... if not sorry for the extra input but def md5()
  15. how do you write this statement??? while($key > 0 and less than 2...????)
  16. join is good, but to keep it simple u could do what u are trying to just exclude the while loop like this: $findBarIdBy_sql = "SELECT * FROM barer WHERE city_id = '$city_id'"; $findBarIdBy_query = mysql_query($findBarIdBy_sql) or die(mysql_error()); $row_barid = mysql_fetch_assoc($findBarid)or die(mysql_error()); // then put the row u want into a varible and query again with sed varible $barid = $row_barid['store id ']; // query again and put that $barid into your query ..... the method i use i never use joins take longer !
  17. OKAY, so i just joined this forum and i like it . heres my question: okay i am building a breeding game for ball pythons and i need help with the breed procces. heres what i got so far- ----source code --- // if someone decided to breed if(isset($_POST['breed'])&&($_GET['breed_key'])&&($_POST['b_key'])){ // check if a male was specifed $errors = array(); if(!isset($_POST['male'])){ $errors[] = "You Must Select A male to breed!" ;} //check if a female was speciefied if(!isset($_POST['female'])){ $errors[] = "You Must Select A female to breed!" ;} // her we go ! // store our name into varibles! $male = $_POST['male']; $female = $_POST['female']; STOP my post data comes from data stored on my mysql database/ looped out into a select menu like this: <select> <option value= "<? $_row['gene'] ex. rec/co/dom ... etc etc and the trait it is ex. albino ?> " </select> my post data value would come to my next page looking like this: ex. albino now the following slash separates genes the snake carries or ex. albino /(gene)- pied ...... now i am exploding my post data like so: // explode the male name so we can see if its het for anything $atribute = explode("/",$male); wich should give me co / pastel / wat ever its het for ex. albino / clown / how can i get the gene backgorund (co) by itself to input it into a if statement how can i get the morph ( pastel ) by itself to input it into a if statement how can i get the hets.. ( albino etc.etc.) by itself to input it into a if statement and check how many traits the snake is het for 1,2,3 ex. ex. it would help if someone was a reptile breeder or had a clue about ball python then this would be a peace of cake to you please help if you can online all night !
  18. okay, i figured i would introduce myself since the top section says so lol! im a 18 young black guy from chicago pretty good with php wouldent say intermediate (compared to some you guys who helped people here lol!) but wouldent say rookie nor novice (Compared to some questions ive been asked lol!) either im just enjoying learning about the web programming i have been trying for about 2years now but not quite got it all the way yet.......
×
×
  • 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.