Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Twango

  1. Twango


    Yeah 2 different names should work.
  2. Well I thought I had it... then I didn't...It WILL download it... here's a quick overview of my code... I set a variable (for this example, let's use $p) to the number of points.Then if ($p >= 10000) { Then I subtract the 10000 points, then I do this:echo "<h1>Congratulations! You bought <u>ASCII by DJ 3P1C</u>!</h1><br/><h2>Download should automatically start, if it does not, contact error@appattacknetwork.com with error code AS-erReqfrom:" . $_SERVER['REMOTE_ADDR'] . "<br/><br/>Thank you for purchasing!";header("content-disposition:attachment; filename=http://www.appattackftp.us/music/ASCII.wav");And it does download and subtract the points... but it doesn't go to the PHP page, on the HTML page I use a dropdown menu each with a unique name, then in the php page (buy.php) I use if ($_POST['uniqeidentifier'] == "whatever) { then I start the download.So the HTML page seems to be posting the data (as it downloads, which is on the php page) but for some reason, it's just not echoing, so basically, here's how it works: 1. User selects thing to buy >> clicks buy >> posts to php page >> handles/checks >> echos confirmation to page >> downloads.But it doesn't go to buy.php, and doesn't echo the confirmation (since it isnt on the buy.php page) I really have no clue why this isnt working. Please help
  3. Wooh, I figured it out! Used header("content-disposition:attachment; filename=myfilename.ext"); and then CHModded it to 0.0.0 and it works great ~ for your guys help if you want to sign up for my social network, I'll give you 5,000 AAN Points.
  4. OK I think I get it, but what do you mean by "outside the webroot"?
  5. I really have tried include("file.wav") and require("file.wav") and also echo "<iframe src=file.wav>" but my problem is autodownloading and protecting
  6. Twango

    AJAX Auto-refresh?

    Is there any way I can make a small scroller I have automatically check for an update every 30 seconds?I never use AJAX so I really have no clue.Thanks!
  7. Hi, I have a point system on my website where users can buy points then redeem them for things...As of now, these things are only database features...Is there any way I can it so the ONLY way possible to download that feature is if the user has enough points in the database?I already have the if statements for the database features. So I already have that.What I need is say, if the user has 10,000 points, it automatically downloads a song.Is this possible?Thanks
  8. Wow I'm an Idiot... I fixed it O_O
  9. Well, somehow i fixed that part. but now this next part isn't working.This is the next part;$udk = "UPDATE Accounts2 SET Special 'Supportive User' WHERE Usr = '$getu'";$go = mysql_query($udk, $con);Help!
  10. I have NO idea why this isnt working.if ($tl >= 100){echo "bf: " . $tl;$pointvalk = $tl - 100;echo "n: " . $pointvalk;$zd = "UPDATE Accounts2 SET Points = $pointvalk WHERE Usr = '$username'";$zd21 = mysql_query($zd, $con);}so i have the variable $tl set to 200.It echos bf: 200then, n: 100but it doesn't update. I cant figure out why this is!! HELP!
  11. Twango

    Integer Function?

    Hi, I'm retrieving data from a MySQL databaseI want to add a value inputted from a text box, then add them together and save that.I know how to retrieve and save. My problem is converting to an integer... I know how to do this in VB.net (CInt) now, how would I do this in PHP?As a last resort, would somthing like eregi_replace("1",1,string) work?
  12. Twango

    iFrame Delete?

    I have a problem...I have a table,That echos a link, that goes to a page that deletes the account selected when the link is clicked..If i wanted that link to open in say...an iFrame, how would i do that?Thanks
  13. Eh I dunno.I know lots of people that say html is too confusing for them.So I thought that instead of typing <P style="text-color:red">text here</P> it would be easier for them to just type "*red*text here *#ef*"Anways.
  14. Yep, I'm developing my OWN programming language, called ASML (AppAttack [My business...] Simple Markup Language).It's really, really simple.AND it gives you the output HTML!Since it IS just starting... it only has a few tags. Mess around and see what you can find.Also, request some tags to be added.Basically, say you want to make ASML text underlined, the tag would be *u* (seem familiar?) and to end it, simple add a # key after the first asterisk(end tag would be *#u*) also, to end any font identifiers (*red*, *blue* etc.) type *#ef* which is the end font.Check it out at http://appattacknetwork.com/asml.php
  15. Twango

    Strip html?

    The "Striphtml" isnt working for me... how would i use that exactly please?i want special characters, (♫,☺☻♥!@# etc.)and other special chars, just no html.Help!
  16. Twango

    Checkbox delete?

    I have a database, where i delete from a php page. I want to make it automatically delete everything in a checkbox.It deletes to a page <a href="delete.php?usertodelete=xxx&modpassword=xxx">HELP me i need to make it do it automatically
  17. Twango

    AJAX Auto-update?

    Hi, I have NO idea how to do this.I know for the php part, I'd simply need$message = "Message here"but for the AJAX i have NO clue.I'd want to have, say, index.html or index.php (doesn't matter at all)I'd want the $message to load in to a little floating div at the top of my page.I have no clue how to do this.Thanks
  18. Hi there, I've been developing a simple coding language all in one PHP page...Here's what i have so far:<?php$asml = $_REQUEST['submt'];//ASML tags$asmle = eregi_replace("\*rd\*", "<font color=red>", $asml);$asmle = eregi_replace("\*b\*", "<font color=blue>", $asml);//Handlingecho "<form action='asml.php' method='post'>ASML Code: <textarea width='400' height='200' name='submt'>$asml</textarea><input type='submit' value='Go'/></form>";echo "Code on a webpage:<br/><br/> $asmle";?>Now, for some reason, say I insert *rd* This is red *b* this is blue into the textarea.it returns *rd* This is red this is blue (this is blue IS blue, This is red and *rd* is not red)I want to also make this be able to add MORE tags, too.i cant figure out what's wrong.Thanks
  19. Twango

    Simple Button Game

    I want a simple button game, you click on it once, it updates a mysql database, refreshes, and echoes the current variable.Made a table called "Buttongame" with a num column.thanks.
  20. Twango

    Simple News Board

    Agh.I got my code all sorted out.Then i realized this:It's returning the OLDEST value in the database...So comes my next question...How would i get it to return the NEWEST and ONLY the newest message?Any way would be greatly appreciated.Thanks!
  21. I have a Table titled "Accounts2"W/ three columns.One titled Usr, the other titled Pw, and the other titled Special.I get the values with this:$username = mysql_real_escape_string($_POST);$sqlm = "SELECT Pw FROM Accounts2 WHERE Usr = '$username'";$resut = mysql_query($sqlm,$con);($con contains the connect info.)I have a form that submits values "U" and "P".U sends the login user's username.P sends the password.I'm testing with a user w/ the user M and pass M.(I know it exists... i have another page with a table listing all)When i useecho $resut;it returns nothing. Please help!
  22. Not at all working for me...I cant have a unique ID right now... I want it to check if the USERNAME already exists...I changed your code to this:$user_exists = mysql_query("SELECT * FROM Accounts WHERE Usr = '" . $con->real_escape_string($_POST[Account]) . "'")->num_rows;Usr is the table column for Accounts, and $_POST[Account] is where i get the data for my account,for some reason $db->query wasnt working, (i use mysql_ query [Example: mysql_query($sql,$con)] for adding the data finally)could the same be happening with $con->real_escape_string?Thanks!
  23. I'm creating a user-creation form.I have the form username form: $_POST[Account]Now... here's my problem..I want something that checks to see if it already exists.Basically i add w/$sql= "INSERT INTO Accounts (Usr, Pw, Special)VALUES ('$_POST[Account]', '$_POST[Password]', '$_POST[sPECIAL]')";So how would i check to see (before i add the account) if it already exists? thanks!
  24. Twango

    If error?

    I cant tell why this isnt working:<?phpecho "<b>If no 1 Record Added MSG appears, add failed</B>";$mh = "***";$md = "***";$mu = "***";$mp = ***";$con = mysql_connect($mh,$mu,$mp);if ($_POST["Modpass"] == "***"){if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db($md, $con);$sql="INSERT INTO Accounts (Usr, Pw, Special)VALUES('$_POST[Account]','$_POST[Password]','$_POST[special]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "1 record added";mysql_close($con)}?><br/><a href="addus.html">Add</a><br/><a href="userdata.php">List</a>I hid the variables for safety.Why isnt this working?I'd also like to add "else"Thanks, giving error:Parse error: syntax error, unexpected '}' in /home/a5301810/public_html/addus.php on line 30
  25. Twango

    MySQL Tables

    Ok, help me please.i want to use this code to add accounts.<?php$mh = "mysql9.000webhost.com";$md = "a5301810_dat2";$mu = "a5301810_***";$mp = "******";$con = mysql_connect($mh,$mu,$mp);if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db($md, $con);$sql="INSERT INTO Accounts (Usr, Pw, Special)VALUES('$_POST[Account]','$_POST[Password]','$_POST[special]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "1 record added";mysql_close($con)?>So it gives the error "Error: Table 'a5301810_dat2.Accounts' doesn't exist"Now, i use a simple <form> to the information to this.-I created the tabled in a different php document with this code:<?php$con = mysql_connect("mysql9.000webhost.com","a5301810_****","******");if (!$con) { die('Could not connect: ' . mysql_error()); }// Create tablemysql_select_db("a5301810_dat2", $con);$sql = "CREATE TABLE Accounts(Usr varchar(20),Pw varchar(20),Special varchar(20),)";// Execute querymysql_query($sql,$con);echo "Created Accounts";mysql_close($con);?>I ran it once (That should work, right?)So. what am i doing wrong? *DB passwords and info hidden for safety "
  • Create New...