Giving pets a Gender

Forum
Last Post
Threads / Messages
That's awesome! I'm actually writing my own script, complete with posting, editing, comments, user accounts, and the like, and I learned most of the stuff I know from W3Schools and from looking at this script. :)
 
Yeah a forum software like PHPBB or MyBB is gonna be my end of year project :) (im gonna make a start in the summer holidays or maybe over christmas)

Next year im leanring vb.net at AS level
 
Nahhh.....is very hard 4 me!
and im italian and when i translate some word,are spelled bad....
 
learning the basics is easy and you can work out other functions from looking at other peoples sample code :)
 
Yes, looking at other people's code is /very/ useful. ;)
 
-.- WHY ME!!???????

Ch Ch.....i use this code : INSERT INTO adopts_owned_adoptables
VALUES gender

But when i click "Go" said:#1064 - 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 'gender' at line 2
 
Arianna said:
I'm afraid you can't make a table inside of a table. What do you mean?

Rosepose, has your problem been solved?

Not yet S: I'm sorry to bother you.

I'm 15, and code challenged *headdesk*
 
Could you try re-copying and pasting it, and making sure the tables are right?
 
Uhm...the my code is good to make a gender table??
INSERT INTO adopts_owned_adoptables
VALUES gender
 
I don't know what you mean? I just manually inserted via phpMyAdmin, I'm afraid I can't help there.
 
i run this in the sql,but dont work!
what i need to do?
change the code?
INSERT INTO adopts_owned_adoptables
VALUES gender
and sorry when you dont understand what im saying,but im italian and for me is so hard make english word......
 
Don't worry - is there any way that you can manually insert it, via phpmyadmin or the like? 'Cause if you just insert "gender" there's no way of having an int variable and stuff like that.
 
SieghartZeke, I don't know if your problem has been solved yet or not, but if not you can try running the following code in sql:

Code:
ALTER TABLE `adopts_owned_adoptables` ADD `gender` varchar(40) NULL;
That should add the gender field to the owned adoptables table.

I also had a question about the gender script. I'm using it on my test site and it works great. I have it so it randomly generates a pet's gender, but I'm wondering if there is a way to have some pets only be one gender, such as female, and not be male at all while still having other adoptables get random genders?
 
It's nice that you asked. I was having a problem, as some pets had 'gender' alts. Basically, it meant that it was the alt image, it was female, if not, it was male. Just add a field called 'malefemale', and then it checks. If it's value is 'onlyfemale', automatically set 'gender' to 'Female'. If it is 'onlymale', set 'gender' to 'Male'. If it is blank, set 'gender' using the random code. Do you get it?
 
No...i have added in the table,but i don't show the pet when i go to adop(after i give a name) And i dont view his Id!
 
I... really don't get what you're saying. :( Could you give me a screenshot of the database in phpmyadmin and a screenshot of adopting, please?
 
tommyk1210 said:
instead of your random number to select gender code, try this:

PHP:
<form id="form1" name="form1" method="post" action="">
  <p>
    <label>
    Male:</label>
    <label>
      <input type="radio" name="Genderselect" value="male" id="Genderselect_0" />
    </label>
    <br />
    <label>
    Female:</label>
    <label>
      <input type="radio" name="Genderselect" value="female" id="Genderselect_1" />
    </label>
    <br />
  </p>
</form>

$gender = $_GET[genderselect];

When i have puted this code in my page,i have get a error!
Why?
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top