
dezkit
Members-
Posts
1,236 -
Joined
-
Last visited
Everything posted by dezkit
-
i got it yesterday, thanks though. topic solved
-
Mathmatical Brain Fart.. with time conversion
dezkit replied to monkeytooth's topic in PHP Coding Help
365 days in a yaer, 52 weeks in a year, 3600000 milliseconds in one hour -
thats impossible imo
-
i don't know but.... <a href="7.php?id=<?php session_start(); $_SESSION['id']=1; ?>">Test 1</a>
-
<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>
-
<a href="http://www.mywebsite.com/members/yourname/<?php echo get_username($_SESSION['user_id']); ?>">profile</a>
-
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.
-
i got it, thanks all of yal
-
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"
-
You never know. I don't know, but I think you can't use <?PHP instead you use <?php
-
index.php <?php include "http://www.yoursite.com/english/SubPage/menu/menu.php"; ?> menu.php MENU IN HERE
-
nope, i wrote "localhost," still nothing i will wait. P.S. i just got some two new windows, they both say "services"
-
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?
-
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."
-
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
-
i always thought about that, but where is the link to press it?
-
I found the problem! i had a space after the "," ! I AM SO HAPPY, THIS IS MY VERY FIRST SCRIPT I DID IN MYSQL!
-
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."; } ?>
-
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 :'(
-
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
-
oh, according to the edit you did for your post, what should i do then?
-
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."; } ?>
-
i got it, thanks alot man!