Jump to content

Design

Members
  • Posts

    45
  • Joined

  • Last visited

    Never

Everything posted by Design

  1. yeah i noticed that and fixed it after i replied ^^ So this should work? : <?php include 'config.php'; include 'opendb.php'; $query = 'CREATE DATABASE xbc'; $result = mysql_query($query); mysql_select_db('xbc') or die('Cannot select database'); $query = 'CREATE TABLE users( ' . ' id int(10) DEFAULT '0' NOT NULL auto_increment, ' . ' username varchar(40), ' . ' password varchar(50), ' . ' regdate varchar(20), ' . ' email varchar(100), ' . ' ip varchar(15), ' . ' flag varchar(1), ' . 'PRIMARY KEY(id))'; 'CREATE TABLE news( ' . ' id int(10) DEFAULT '0' NOT NULL auto_increment, ' . ' author varchar(40), ' . ' title varchar(40), ' . ' content NOT NULL ' . ' date varchar(20) ' . 'PRIMARY KEY(id))'; 'CREATE TABLE maps( ' . ' id int(10) DEFAULT '0' NOT NULL auto_increment, ' . ' author varchar(40), ' . ' title varchar(40) NOT NULL, ' . ' type varchar(20), ' . ' content MEDIUMBLOB NOT NULL, ' . ' size NOT NULL, ' . 'PRIMARY KEY(id))'; $result = mysql_query($query); include 'closedb.php'; ?>
  2. ok thx, I was just making sure that wouldnt conflict with the first 1.
  3. Ok.... so here is my db creation thing right now, I wanna add in 2 other tables to this database, what's the best way to do so? <?php include 'config.php'; include 'opendb.php'; $query = 'CREATE DATABASE xbc'; $result = mysql_query($query); mysql_select_db('xbc') or die('Cannot select database'); $query = 'CREATE TABLE users( ' . ' (id int(10) DEFAULT '0' NOT NULL auto_increment, ' . ' username varchar(40), ' . ' password varchar(50), ' . ' regdate varchar(20), ' . ' email varchar(100), ' . ' ip varchar(12), ' . ' flag varchar(1), ' . 'PRIMARY KEY(id))'; $result = mysql_query($query); include 'closedb.php'; ?> Any help is greatly appreciated.
  4. Pretty cool, I checked it out with a friend, good stuff.
  5. What I want to do is have my site so that when a user clicks a link, it uses the $GET method and uses a dynamic title for the target URL. My question is, how would I get this to work, I want it to set the variable for the $GET method, and then load up the same page, but with different content in the main portion of the page. I'd like to figure out to do this before I start the coding of my site, so that I can just implement it as I go. Thanks to anyone who helps me out on this.
  6. I'm thinking you have counter.txt in the wrong place, since you moved your php file, you need to move counter.txt with it
  7. you only want to open the file? in that case, fopen('page.txt',r); will open it in read-only format
  8. you've got a ] at the end of the code, i took that out and the page loaded, still no mail though. lemme take out the quotes again and try
  9. [code] Parse error: syntax error, unexpected ']' in /home/pc72/public_html/smash/Test.php on line 61 [/code] Same error, different line
  10. well, with my method, you could make a javascript counter or something that counts down or up until the end of the song, when the user presses the 'pause' button, have the counter stop also. once the counter hits a certain number(the end of the song), have it go to the new page. By the way, if you wanna find out the song exact song length, just convert the file type of the song to .WAV, and open it up in the sound recorder program.
  11. getting an error now: [code] Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/pc72/public_html/smash/Test.php on line 54 [/code]
  12. Here's my script: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>GSmash Tournament registration</title> </head> <body> <?php // Check to make sure that the user isnt spamming people via the form: function spamcheck($field){   if(eregi("to:", $field) || eregi("cc:", $field) || eregi(";", $field)){       return true;   }   else{       return false;   } } function checkType(){   if($_POST['type1'] == true && $_POST['type2'] == false){       $type = 1;   }   elseif($_POST['type1'] == false && $_POST['type2'] == true){       $type = 2;   }   elseif($_POST['type1'] == false && $_POST['type2'] == false){       echo "<font color='red'>ERROR: You must select a tournament type.</font>";   }   else{       $type = 3;   } return $type; } //Make sure the form is filled out: if(isset($_POST['email'])){   //check if the email address is invalid   $mailcheck = spamcheck($_POST['email']);   if((bool)$mailcheck == true){       echo "Sorry, the e-mail you have entered is invalid, please re-enter it.";   }   else{       //send email if the e-mail is valid       $email = $_POST['email'];       $subject = "Smash Entry For: " . $_POST['name'];       $type = checkType();       $message = $_POST['sname'] . ", " . $_POST['char'] . ", " . $type;       mail("Linkmaster424@aol.com", "Subject: " . $subject, $message, "From: " . $email . "\r\n");       echo "Thanks for your entry!  Your data will be sent to the tournament staff.";   } } else{ ?>   <h1 align="center">Glenwood SSBM Tournament Form</h1>   <hr />   <br />   <h3 align="center">Fill out the form and click the &quot;Send&quot; button.</h3>   <form method="post" action="http://smash.neogamerz.com">   Email: <input type="text" name="email" /><br />   Name: <input type="text" name="name" /><br />   Smash Name: <input type="text" name="sname" max=4 min=1 size=16><br />   Character: <input type="text" name="char" /><br />   Entry Type(select at least one):<br />   One on One:<input type="checkbox" name="type1"><br />   Teams:<input type="checkbox" name="type2"><br />   <input type='submit' value='send' />   </form>   <p><em>Note: In order to join the tournament, you will be required to pay an entry fee   of $5.00 upon entry. &nbsp;This is mandatory for both teams and singles,   meaning that if you are on a team, you AND your partner will need to pay the entry fee,   totalling ten dollars. &nbsp;The same goes if you were to enter in both tournaments, you   would have to pay a fee of ten dollars(five for each tournament).</em></p>   <br />   <p><font size="2">&copy;2006 By Tristan Nolan.</font></p> <?php } ?> </body> </html> [/code] I've got the script working, but it's not mailing me the form data when you press submit.
  13. You could download dreamweaver, just use a trial version, the site is [url=http://www.adobe.com]http://www.adobe.com[/url]
  14. still not mailing the info, can someone plz help?
  15. :D I think you nailed it However, it's not e-mailing it to me when i submit the form, no error being displayed, but yeah. also, what code would I use to make a back button appear on the page after a successful registration occurs?
  16. wait... not so fast it loads the page fine, but when i try to submit data through the form, it doesnt email me, but instead displays this message: [quote]Warning: Missing argument 1 for checktype() in /home/pc72/public_html/smash/Index.php on line 21[/quote more help needed.. lol
  17. Now I've got this error :( [code] Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/pc72/public_html/smash/Test.php on line 52 [/code]
  18. check back at the original post, you have been helped :-D
  19. my best suggestion is that you open the song in a player, find out EXACTLY how many seconds long it is, then use a window.location = song.php function to redirect the page, and set the body to onload=setTimeOut(xxxx('redirect()'), xxxx being the time(in milliseconds) of the song. This is done using javascript, btw
×
×
  • 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.