Jump to content

dezkit

Members
  • Posts

    1,236
  • Joined

  • Last visited

Everything posted by dezkit

  1. i got it yesterday, thanks though. topic solved
  2. 365 days in a yaer, 52 weeks in a year, 3600000 milliseconds in one hour
  3. thats impossible imo
  4. i don't know but.... <a href="7.php?id=<?php session_start(); $_SESSION['id']=1; ?>">Test 1</a>
  5. <a href="<?php echo 'index.php?page='; echo get_username($_SESSION['user_id']);?> ">profile</a> or <a href=" <?php echo 'index.php?page='; echo get_username($_SESSION['user_id']); ?> ">profile</a>
  6. <a href="http://www.mywebsite.com/members/yourname/<?php echo get_username($_SESSION['user_id']); ?>">profile</a>
  7. how do i do so if theres nothing in that table, i can echo "There isn't anything, yet." while($row = mysql_fetch_array($result)){ echo $row["member"]; echo "<br>"; } i was thinking while($row = mysql_fetch_array($result)){ echo $row["member"]; echo "<br>"; } else { echo "there are any members yet"; } but it doesnt work.
  8. i got it, thanks all of yal
  9. well all i need is so i can insert something into a table with a form. index.php <form action="db.php" method="post"> <table border=0> <tr> <td>Steamid <td><input type="text" name="steamid" id="steamid"> <tr> <td>Access flags <td><input type="text" name="accessflags" id="accessflags"> <tr> <td>Account Flags <td><input type="text" name="accountflags" id="accountflags"> <tr> <td colspan="2" align="right"><input type="submit" value="Submit"> </form> </table> db.php <?php // Make a MySQL Connection mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("1337bunnies") or die(mysql_error()); // Insert a row of information into the table "example" mysql_query("INSERT INTO users (steamid, accessflags, accountflags) VALUES('$steamid', '$accessflags', '$accountflags' ) ") or die(mysql_error()); echo "Data Inserted!"; ?> whenever i fill out the form and i look into phpmyadmin, its blank. i don't know, but i think im doing wrong stuff with the varchar and what not. here is the format. steamid = "STEAM_0:0:123456" accessflags = "abcdefghijklmnopqrstuvwxyz" access = "de"
  10. You never know. I don't know, but I think you can't use <?PHP instead you use <?php
  11. index.php <?php include "http://www.yoursite.com/english/SubPage/menu/menu.php"; ?> menu.php MENU IN HERE
  12. nope, i wrote "localhost," still nothing i will wait. P.S. i just got some two new windows, they both say "services"
  13. when im on the xampp control panel, it says Status Check OK Busy... Apache service started Busy... MySql server started is this normal? should i wait?
  14. yeah, i installed that already, but when i go into "localhost" on my browser it says "Firefox can't establish a connection to the server at localhost."
  15. whats that thing called called that i can download so whenever i type localhost in my browser i can view php files and what not
  16. i always thought about that, but where is the link to press it?
  17. I found the problem! i had a space after the "," ! I AM SO HAPPY, THIS IS MY VERY FIRST SCRIPT I DID IN MYSQL!
  18. index.php <?php $ip = getenv("REMOTE_ADDR") ; ?> <form action="newsletter.php" method="post"> Email: <input type="text" name="email"> <input type="hidden" name="ip" value="<? echo $ip ?>"> </form> newsletter.php <?php $email = $_POST['email']; $ip = $_POST['ip']; // Make a MySQL Connection mysql_connect("mysql", "dezkit", "xxxxxxx") or die(mysql_error()); mysql_select_db("newsletter") or die(mysql_error()); // Insert a row of information into the table "example" mysql_query("INSERT INTO users (email, ip) VALUES('$email', '$ip' ) ") or die(mysql_error()); echo "Thank you for registering for our newsletter!"; ?> admin.php (not password protected page, yet.) <?php mysql_connect("mysql", "dezkit", "xxx") or die(mysql_error()); mysql_select_db("newsletter") or die(mysql_error()); $result = mysql_query("SELECT * FROM users") or die(mysql_error()); echo "<form action='admin2.php' method='post'><textarea name=body1 cols=45 rows=10></textarea><input type=hidden name=to1 value='"; while($row = mysql_fetch_array( $result )) { echo $row['email']; echo ", "; } echo "'><br><input type=submit value=Submit></form>"; ?> admin2.php <?php $to = "$to1"; $subject = "xxxxxxx"; $body = "$body1"; if (mail($to, $subject, $body, $headers)) { echo "Newsletter has been sent."; } else { echo "Newsletter has not been sent."; } ?>
  19. yeah.
  20. meh, I don't understand still haha, I posted a code above, can you or somebody please correct it. I am not a mysql wiz :'(
  21. admin.php <?php mysql_connect("mysql", "xxx", "xxx") or die(mysql_error()); mysql_select_db("newsletter") or die(mysql_error()); $result = mysql_query("SELECT * FROM users") or die(mysql_error()); echo "<form action='admin2.php' method='post'><textarea name=body1 cols=45 rows=10></textarea><input type=hidden name=to1 value='"; while($row = mysql_fetch_array( $result )) { echo $row['email']; echo ", "; } echo "'><br><input type=submit value=Submit></form>"; ?> admin2.php <?php $to = "$to1"; $subject = "xxxxxxx"; $body = "$body1"; if (mail($to, $subject, $body, $headers)) { echo "Newsletter has been sent."; } else { echo "Newsletter has not been sent."; } ?> correct my code, will ya
  22. oh, according to the edit you did for your post, what should i do then?
  23. whats the code so i can send to multiple people? <?php $to = "[email protected]"; $subject = "dasd"; $body = "sdadas"; if (mail($to, $subject, $body, $headers)) { echo "sadar has been sent."; } else { echo "asddsa has not been sent."; } ?>
  24. i got it, thanks alot man!
  25. how do i do that?
×
×
  • 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.