Jump to content

reportingsjr

Members
  • Posts

    1,183
  • Joined

  • Last visited

Posts posted by reportingsjr

  1. 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?

  2. 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

  3. 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??

  4. 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~

  5. 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.

  6. 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?

  7. 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..

  8. 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!

  9. 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.

  10. 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..

  11. 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?

  12. Can someone teach me PHP in like a chat room? No offense but the w3schools tutorial on it is really confusing. I would like to learn php so i can create better websites so I need alot of help... Thanks!

  13. Yay! thank you for the help, it did work =].If I get stuck on something else along the way would you help me? If you would I would be happy! THANK YOU VERY MUCH

  14. Hi, i just started trying to learn php and wanted to see what I am doing so I was wondering what to use to code it. I downloaded easyphp but I have no clue where to go from the begining box.. could someone help me?

×
×
  • Create New...