Jump to content

reportingsjr

Members
  • Posts

    1,183
  • Joined

  • Last visited

Everything posted by reportingsjr

  1. selacius.. In PHP, putting variablea and text together doesnt work. thats why the periods are there.
  2. Thats just an example, you can use any type of picture. Also, if your webpage and the picture arent in the same folder you will need to type up the rest of the folder location(or URL). =]
  3. You can text veiw it in any browser to make sure its working.Just follow these steps:1. make document and save2. open browser3. in top corner select File4. Select open file5. find the folder your web page is in and click on it6. click open!! (yay)
  4. Put it in a code block like this:Main.php <form method="post" action="login.php"><input name="id" type="text" id="id" size="8" maxlength="8" style="font-size:12px"><input name="pw" type="password" id="pw" style="font-size:12px" value="" size="8"><a href="#" onClick="popwin=window.open('login.php','popwin','scrollbars, width=850,height=650');"><input type="image" src="images/submit.gif" name="submit" value="submit" onClick="()"><input type="submit" value="submit"> login.php <?php$id = "$_POST['id']";$pw = "$_POST['pw']";?> use the global command $_POST[''] or $_GET[''] for forums ;-]Also, I edited main.php you had extra things and were missing things. This should work.
  5. reportingsjr

    Insert into

    WTF, Im using PHP myadmin which uses mysql 4.1.9 and this wont work!! can someone pleaaassse help me. I dont know why it wont work. When I do just one row at a time it works perfectly, but not when I do two or more.The mysql query is: INSERT INTO lvls (minexp, maxexp)VALUES ('0', '124')VALUES ('125', '215'); and the table looks like this:Field|Type|otherslevel | int(255) | NOT NULL,auto_increment, primary keyminexp | int(255) | NULLmaxexp | int(255) | NULLThis is supposed to contain all the minimum and maximum level experiences. I already have like 300 of the levels done and this is for a calculator. Can someone please tell me why this wont work?
  6. I hope it will. thank you for the help.
  7. That would be nice, but can we set the server and port? (I need a chatroom for a server that already has a bunch of stuff).
  8. Okay, im trying to set up a forum with PHP (just a test one) and I did something wrong here. every time you put in the password and username it goes to this and half the code pops up!! Can you tell me what happened here?(ill bold where the code starts that shows up on the page) <?php$name = '$_POST['usrname']'$pwd = '$_POST['pwd']'// set database server access variables:$host = "localhost";$user = "root";$pass = "*cant give this*";$db = "forum";// open connection$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");//create query$query = "INSERT INTO `members` VALUE ( NULL,".$name."NULL".$pwd.");//execute query$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); //see if it workedif (mysql_num_rows($result) >[B] 0){ echo "Thank you for registering echo ".$name."! Your account has been created. Please go back and log in.";}else{echo "Sorry, account couldnt be created. Please come back and try again";}//free result memorymysql_free_result($result);//close connection to MySQLmysql_close($connection);?>[/B] All im trying to do is insert the persons username and password into a table called members in a database called forum.EDIT: from [b ] to [/b ] in the code is what shows up
  9. reportingsjr

    Images?

    Can you put an image into a mySQL table I have code so that the table prints out so this would be the table:+--------+-------------+------------------------------------------+ |pic_id..|Description..| file_location.................................|+--------+-------------+------------------------------------------+|1..........|Sweet!....|C:desktop/my_documents/pics/pk1.|+--------+-------------+------------------------------------------+Could I make it so when file_location for pic_id 1 was posted in an HTML table it would be a picture? I dont want to have to upload a picture to imageshack everytime and have to put the link in there. Help on how I could do this??
  10. Put spaces inbetween the : and the code first off.Why put it in div? Why not <p> or something else?
  11. I can do it =]. It still works in most browers.ok, the arms moving and stuff you will have to use an animation program such as:-Flash-Adobe Image ready-GIMP-Fireworksetc..anyways down to the marquee: <marquee>Images and stuff here</marquee> that will make it scroll to the right I think (not sure what default is)if you want to make it scroll to the left or right put in (<marquee>): direction="up, down, left, right" (only one)to set the speed it scrolls at put this in next to the code above: scrollamount="0-infinity" ORif you want it to stop when mouse is over: onmouseover="this.stop()" onmouseout="this.start()" theres another thing that you can put that sets a speed (only slows down when mouse is over) but im too lazy to find. Hope this clears this up =]~reportingsjr~
  12. Yea, I forgot about that klappy.
  13. Your going to have to put in widths and stuff, you cant exactly just align them up. Plus your coding doesnt exactly work. Do you use MS Frontpage or something? Cause I hate that spacing coding.
  14. reportingsjr

    Images?

    Im like brand new to SQL (have a bit of understanding) and I have some problems and questions:im trying to use mySQL, it wont work. What file do I run?thats all for problems.Questions:Can you put images into tables? So you could like host an image through a table? Im trying to make it so when someone in a group im in can go through fill out a form and the image the selected in that form plus al the other stuff will go into a table. The table will then get echoed through PHP into an HTML table.How do I do this? Or will we just have to upload images from like imageshack?
  15. Ok, im guessing your host has PHP support? (I hope so)anyways, first create two pages,home.php and mail.phpHere is the body coding for home.php: <form action="mail.php" method="POST">Your email adress:<input type="text" name="thereemail"><br>Subject:<input type="text" name="subject"><br>Email:<br><input type="textarea" name="email" heigth="10" width="30"><br><input type="submit" value="send email!"><br></form> Here is the coding for mail.php: <?php$subject = $_POST['subject']$email = $_POST['email']$there_email = $_POST['thereemail'] mail("youremail@domain.com","$subject","$email","From:$there_email");?> There are a few minor adjustments need like:in mail.php change "youremail@domain.com" to whatever your email adress isother thigns like that..
  16. Go to the PHP forum here.. I think someone put a topic on this so they have the code to it ;-).
  17. Ohhh, I got you. so you only need the css and nothing else. Thanks! Ill try this once I get home =]. Plus, this will make my website files much smaller. One more thing, How would I make a footed file or a header file and just put in like a link so that way it shows every time. I remember seeing something like this somewhere and I forgot where and how. I want to know this because I have a link bar and I would like to put it in every page without having to do all the coding I have to. Thanks Little Goat!
  18. Im making a website with a few pages and didnt want to do the style over and over again and I tried linking.How do I do it!!the code for my style sheet is: <head><title></title><style type="text/css"><!--body { font-size: 12pt; font-family: Times,Times new roman; background-color: #000000; color: #FFFFFF; }table { cellpadding: 0px; }--></style></head> my link is: <link rel="stylesheet" type="text/css" href="\main.css"> If I am coding the style sheet wrong how do I code it? yes, they are in the same folder and my style sheet is saved as .css.help appriciated!Edit: thanks Little Goat, I got it now but check last post.
  19. reportingsjr

    Array help

    Clavin, If you want it to be an array (holds many variables) why do you has a different array for each one?
  20. Darkelf you did this part wrong : //check username and password and set login variable if correctif $username == 'DarkElf' {if $password == 'Spoon' $_SESSION['login'] = 'yes'; };?> Its supposed to be: //check username and password and set login variable if correctif $username == 'DarkElf'{ if ($password == 'Spoon'){ $_SESSION['login'] = 'yes'; };};?> Just so he doesnt do that part wrong..
  21. I did all of that.. It still wont show anything on the second page .
  22. reportingsjr

    EasyPHP help.

    I have written some basic PHP code so I can learn things... BUt, when I write it it doesnt work. I was just messing around making a tire application but it wont show up. Here is the code:First page: <body><center><h3>Joes Tire Shop</h3></center>Welcome to Joes Tire Shop! We sell the best of tires just for you!<br>Just fill out the following for to buy some tires from us!.<br><form action="second tire form page.php" method="POST">Name:<input type="text" maxlength="20" name="name"><br><fieldset><legend>Adress Information:</legend>City:<input type="text" name="City"> State:<input type="text" maxlength="2" name="State"><br>Zip Code:<input type="text" maxlength="5" name="Zipcode"> Adress:<input type="text" name="Adress"></fieldset>Amount of tires:<input type="text" maxlength="3" name="tireamt"><br><input type="submit" value="submit"></form></body> Second Page <body><?phpecho "Thank you for ordering tires $_POST["name"]!;echo "You ordered: $_POST["tireamt"];echo "Your adress is: $_POST["city"], $_POST["state"], $_POST["adress"], $_POST["zipcode"];?> If the coding isnt the problem, Do I need to save it in a certain folder for it to work?
  23. It might be because of the line height.. Also the two font sizes are different in #containerLogin and #loginContainer,you put those two nested inside of each other.
×
×
  • Create New...