Jump to content

anon

Members
  • Posts

    134
  • Joined

  • Last visited

    Never

Everything posted by anon

  1. So the logout button would be - <form name="form1" method="post" action="logout.php"> <input type="submit" name="Submit" value="Logout"> Then I would put a redirect in the logout.php file?
  2. Hi, I'm reading a tutorial over at - http://www.phpeasystep.com/workshopview.php?id=6 It says that to terminate the session I should create a file: <? session_start(); session_destroy(); ?> If a user wanted to logout, would I make the Logout Button link to this file or something?
  3. No, I mean CPanel, as in the web hosting thing. Its the one with Fantastico and all that. So I must just look for a tutorial on sending an email to people to confirm registration?
  4. Cool man, thanks a lot! Another question - How would you go about setting up some thing where every person who registers receives an email to confirm. Is there something in CPanel for this?
  5. So I should use " " And, the field with lots of values in it will work right?
  6. Hi guys, as I said, this is more assistance than anything. Here's my code for adding a "User" to my Database <? // Make mysql connection below $mysql_conn = @mysql_connect("****", "*****", "******") or die("Could not connect to the Database, Please send us an e-mail in the contact section");\ @mysql_select_db("*******", $mysql_conn) or die("DataBase does not exist"); // prepare the form values for insert $name = mysql_real_escape_string($_POST['name']); $password = mysql_real_escape_string($_POST['password']); $email = mysql_real_escape_string($_POST['email']); $values = mysql_real_escape_string($_POST['value1' , 'value2' , 'value3' , 'value4' , 'value5' , 'value6' , 'value7' , 'value8' , 'value9' , 'value10']); // now i'm going to insert all the values into the database $sql = "INSERT INTO '****' ( 'name' , 'password' , 'email' , 'values' ) VALUES ('$name' , '$password' , '$email' , '$values')"; $res = mysql_query($sql) or die(mysql_error()); // now, i'm going to let people know when something has gone wrong, or if its gone right. if(!$res){ echo "Had a bit of a problem with the database, please report this in the help section so that we can totally freak out and fix it."; } else { echo "Successfully added you as a member, now you can go and edit your account. First though, you will need to complete subscription in your email inbox"; } // that concludes the script, thanks for using this service. HAHA!! World domination will be mine. Soon.... ?> I just want to know if this would work? I'm especially not sure of the variable $values, I want lots of values stored in one field, and then recall it later as a list.
  7. This is my first question regarding building a website with user accounts. Should I make a new table for each user? Or, should I just store their info in various fields?
  8. (not being smarmy here) I said I don't just want it to delete.... I want it to delete the entire table AND reset counter I understand that Truncate does that now.
  9. Ok. What exactly do you mean?
  10. yes ...... this is what it is now though. $url = mysql_query("SELECT u_link FROM addurl") or die("Query error ".mysql_error()); $row = mysql_fetch_row($url); $page = file_get_contents($row[0]); // The HTML file will be put into a string called $page $page = file_get_contents($url);
  11. Ok, its better, but Warning: file_get_contents() expects parameter 1 to be string, resource given in /home/***/public_html/****/thespider.php on line 13 wtf
  12. Different error now. <br /> <b>Parse error</b>: syntax error, unexpected $end in <b>/home/******/public_html/****/thespider.php</b> on line <b>21</b><br /> My code <?php // Make mysql connection below $mysql_conn = @mysql_connect("localhost", "****", "*****") or die("Could not connect to the Database, Please send us an e-mail in the contact section"); @mysql_select_db("*****", $mysql_conn) or die("DataBase does not exist"); $url = mysql_query("SELECT u_link FROM addurl") or die("Query error ".mysql_error()); $row = mysql_fetch_row($url); $page = file_get_contents($row[0]); // The HTML file will be put into a string called $page $page = file_get_contents($url); $sql = "insert into *** VALUES ($page)"; // Insert into Database; mysql_query($sql); ?>
  13. Here is the code <? // Make mysql connection below $mysql_conn = @mysql_connect("localhost", "****", "***") or die("Could not connect to the Database, Please send us an e-mail in the contact section"); @mysql_select_db("******", $mysql_conn) or die("DataBase does not exist"); $url = mysql_query("SELECT u_id FROM addurl") or die("Query error ".mysql_error()); // The HTML file will be put into a string called $page $page = file_get_contents($url); // Insert into Database; mysql_query("insert into stevedex values ($page)"); ?> I run it through Cron, I get this error <br /> <b>Warning</b>: file_get_contents() expects parameter 1 to be string, resource given in <b>/home/****/public_html/***/thespider.php</b> on line <b>11</b><br /> Why?
  14. So you don't want those menu's to drop down?
  15. I don't want to just empty the table, i want it to reset back to 1 afterwards. Doesn't do that, carries on counting after I have deleted the entire table.
  16. Yes, i tried that not 10 minutes ago and it worked. Thanks anyway though.
  17. I have a table with auto-increment. When i delete all data in the database, and then enter a new value, the id won't return to 1, it will auto-increment after the last deleted value. e.g the new values id will be 5, not 1. How do i get it to reset?
  18. Thanks. This is what I get Array ( [url] => http://www.yahoo.com [add] => Submit ) data entered into database The thing is that it does show that there's an entry. But when you check the field its just blank.
  19. I have a form which has one field; url. This field should post its variable to a mysql table called addurl. I already have the whole thing set up. Problem is that when i check what values are in the table they are blank. There is no value. // prepare form values for insert $URL = mysql_real_escape_string($_POST['url']); // Make mysql connection below $sql = "INSERT INTO `addurl` (`u_link`) VALUES ('$URL')"; $res = mysql_query($sql) or die(mysql_error()); if(!$res){ echo "Could not enter data"; } else { echo "data entered into database"; } ?> </html>
  20. ActionScript is probably the most logical and straightforward scripting languages out. The Debugger helps a lot too.
  21. Since when does html have arrays? Yes. WTF
  22. Like papaface said; you'll probably need to try regex. DO you want to display the site as it was graphically, on another server?
  23. What you'll need to do is design a script which downloads the HTML. You can use cURL or file_get_contents (the latter being easier). Then, you'll want to use regex (regular expressions) to filter the HTML anything like $27.50. You'll want to make that a variable which you can then update mySQL with. I do't know Regex, but from what I've read, its quite straightforward and logical.
  24. Okay, i'll change the database. mysql_query("insert into *** values ($page)");
×
×
  • 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.