Jump to content

Ruud Hermans

Members
  • Posts

    171
  • Joined

  • Last visited

Everything posted by Ruud Hermans

  1. I can't figure this out. It tells me "Man" and "Vrouw" are not declared but those are the values from the ComboBox1. I have searched the internet looking for the answer but I can't find it anywhere. Sure there should be more easy way's for the entire thing but I am still in the beginningstage of learning. So if possible build on from this and hopefully some one is able of telling me what is wrong. Public Class Form1 Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim leeftijd, lengte, gewicht, AL, BMR, BMR1, BMR2, BMR3, BMR4, BMR5, BMR6, onderhoud, eiwitten As Integer Dim geslacht As String geslacht = ComboBox1.Text lengte = TextBox1.Text gewicht = TextBox2.Text AL = ComboBox2.Text leeftijd = TextBox6.Text BMR1 = gewicht * 13.7 BMR2 = lengte * 5 BMR3 = leeftijd * 6.8 BMR4 = gewicht * 9.6 BMR5 = lengte * 1.8 BMR6 = leeftijd * 4.7 If geslacht = Man Then BMR = 66 + BMR1 + BMR2 + BMR3 ElseIf geslacht = Vrouw Then BMR = 655 + BMR4 + BMR5 + BMR6 Else MsgBox("Geen ingave geslacht.") End If TextBox3.Text = BMR End SubEnd Class
  2. Maby this will help http://drupal.org/node/129982
  3. Read the CSS tutorial on www.w3schools.com
  4. Why the need to double post?
  5. Nice one bitching on people that where trying to help you.
  6. So is it like in (x)html.include("../header.php"); and. include("folder_name/header.php");
  7. No, it wouldn't even mind if you used 10 <h1> tags as long as you use them in the right way.opening tag <h1>text</h1>closing tag
  8. Thanks.I am thinking of writing some xhtml/PHP script that people could use to create CSS for tables ore backgroundimages based on some tutorial I found in a book to practise a bit.Would it be usefull to post those files on the forum for people to use and if yes in what section?
  9. You mean when you add values to h1 in the CSS if they will also apply to h2?
  10. Is it possible to get the xhtml inside a PHP file to be validated ore is there no use in this?
  11. Do you mean each needs to have a own profile stored in a database or that there is one general account that could be used by everyone?
  12. Never used it, think I'll just stick to Notepad++.
  13. When I include a file from a different folder using the include function how do I link to it. Do I need to use the full www adres?
  14. Don't you mean a form?Look into PHP.
  15. There seems to be something going on wit more tutorials on the w3schools main website. Just try o refresh i a few times maby that will help out otherwise I am sure it will be solved soon.
  16. Depends, maby he wants to use it fo home use only to make a adressbook form example. Btw. if MySQL is installed you should also have access to the console.
  17. What country are you from and is the other company located in the same country as you are?
  18. Anyone has any knowledge on laptop's.It happened several times to me now allready that I somehow managed to "turn-off" the scroll button underneath my mousepad, however I have no idea how I did it and how to restore it.
  19. Maby it would be nice for example with SQL if there where some assigments to make for people learning it on the forum or the website itself.
  20. You are running WAMPSERVER I presume.Then you can go to localhost and link from the index page of your www folder.Ore click on the icon on the right bottom of your screen (next to the clock) and it will be listed there.
  21. My database info$database$user$password
  22. No, you do not need to learn PHP first.I'm learning SQL now to from www.w3schools.com tutorials. You can also run queries in PHPMyAdmin ore sqlitemanager if you use WAMP.
  23. Sorry needed to delete the $title but forgot it, it has no value.I notest that the end is echoed of the script but I can't find any logical resaon why.
  24. Running the follwing form seems fine but when I then go to the database there is no data added to it. <html><head><link rel="stylesheet" type="text/css"href="style.css" /></head><body><form action="insert.php" method="post"><table><tr><td><b>Name:</b> <input type="text" name="name" /><br /><br /></td><td><b>Caliber:</b> <input type="text" name="caliber" /><br /><br /></td><td><b>Trigger Action:</b> <input type="text" name="trigger_action" /><br /><br /></td></tr><tr><td><b>Magazine Capacity:</b> <input type="text" name="magazinecapacity" /><br /><br /></td><td><b>Locktype:</b> <input type="text" name="locktype" /><br /><br /></td><td><b>Weight:</b> <input type="text" name="weight" /><br /><br /></td></tr><tr><td><b>Lenght:</b> <input type="text" name="lenght" /><br /><br /></td><td><b>Height:</b> <input type="text" name="height" /><br /><br /></td><td><b>Barrel Lenght:</b> <input type="text" name="barrel_lenght" /><br /><br /></td></tr><tr><td><b>Triggerstop:</b> <input type="text" name="triggerstop" /><br /><br /></td><td><b>Scope:</b> <input type="text" name="scope" /><br /><br /></td><td><b>Scope Lenght:</b> <input type="text" name="scope_lenght" /><br /><br /></td></tr><tr><td><b>Comments:</b> <input type="text" name="comments" /><br /><br /></td></tr><tr><td><input type="submit" /></td></tr></table></form></body></html> Here is the script. <?phpinclude("config.php");$con = mysql_connect("localhost","$user","$password");if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("localhost", $con);$sql="INSERT INTO person (Name, Caliber, Trigger Action, Magazine Capacity, Locktype, Weight, Lenght, Height, Barrel Lenght, Triggerstop, Scope, Scope Lenght, Comments)VALUES('$_POST[name]','$_POST[caliber]','$_POST[trigger_action]','$_POST[magazine_capacity]','$_POST[locktype]','$_POST[weight]','$_POST[lenght]','$_POST[height]','$_POST[barrel_lenght]','$_POST[triggerstop]','$_POST[scope]','$_POST[scope_lenght]','$_POST[comments]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "1 record added";mysql_close($con)?>
×
×
  • Create New...