Jump to content

computermax2328

Members
  • Posts

    281
  • Joined

  • Last visited

Everything posted by computermax2328

  1. This is a very interesting method you have created. The first thing that stands out to me is that your INSERT query is inside of your while() loop. That is a bad practice. INSERT commands are designed so you don't have to loop data in order to make them work. Just INSERT all of the values and query the database. No need to loop it.
  2. He doesn't run a mysqli query?? <?php $tabel = $_REQUEST['database']; $firma = $_REQUEST['firma']; $tel = $_REQUEST['telefon']; $email = $_REQUEST['email']; $kontakt = $_REQUEST['kontakt']; $con=mysqli_connect("localhost","root","kala", $tabel); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } INSERT INTO $tabel (firma, telefon, email, kontakt) VALUES ('$firma' , '$tel' , '$email' , '$kontakt'); mysqli_close($con); ?>
  3. That keeps popping up because you are missing a semi-colon here... $MyMail = $_POST['mymail']; Add it at the end like I did. You might have other errors as well.
  4. You are using single page submission, which is fine, but right now you are telling your for to do nothing. <form action= "" method="post"> Tell it to execute this page. You can also look at this if you want, but I don't see the point of using it. Maybe someone else could explain. http://www.html-form-guide.com/php-form/php-form-action-self.html
  5. The answer is yes and you can refer to this page http://www.w3schools.com/php/php_file_upload.asp
  6. Since you are looping through information in your database that is associated with the link I would add the links or page name into your database in the same row as the title. Therefore, you would echo out the title as you do and also anchor text around it. Inside that anchor text you would echo out the page that is associated with the title to link to that page.
  7. Thanks for picking up my errors man. I just typed it up real quick so the person could see an example. I didn't think that they were going to want an exact solution. Just trying to give him a push. The $connection thing was my bad. Something I do in my code so I did it naturally.
  8. My bad use isset() if(isset($_POST['submit'])){ } Also in the query where it says table name put your table name. I just want to throw this out there that this is really sloppy code. A lot of stuff on this page is not best practices. I suggest that you continue to practice like you are now so that you can learn why things like putting your MYSQL connect on an HTML page is not a best practice. I am trying to guide you along here and help you troubleshoot. Not give you the answer, even though I kind of already did. You just need to figure out the rest. Let me know what happens
  9. Ok! To start, I had never seen "$PHP_SELF" before, so I Googled it and found that you have to use <?php $_SERVER['PHP_SELF'] ?>. Apparently, "PHP_SELF" does not work in php 5 or greater. Since you are doing single page submission at the very top of your page with the form on it you are going to do something like this... //Connect to database if($_POST['submit']){ $name = mysql_escape_real_string($_GET['coins']); $sql = "SELECT `coins` FROM tablename WHERE `name`=$name"; $query = mysql_query($sql, $connection); while ($row = mysql_fetch_array($query)) { $amount = $row['coins']; } } Then you can echo the variable $amount on the page where ever you want it. This is my 200th post by the way. Wooo! Milestone!
  10. Ok, so if you are going to do it that way, when the user clicks "Check Balance" you are going to want to have that form that the input and submit button are in pass the information to a process page to query the database and echo out how many coins that person has. You can do a single page submission, which would have this page query the database or create a process page. Can you post the HTML form that you are using so I can help you further?
  11. If you want to do it without reloading the page, like how Google does its search, then you are going to need to use Javascript. If you want to use PHP you are going to have to create a process form for when you input the name and then submit it to the server.
  12. I Googled it and read some answers from other forums and they said the exact opposite, use `` not '' around everything that needs them. Try both!
  13. Hello All, I came across a website a couple of months ago called Kodery. It has been in beta for a while now, but I had to file a request to get access when I first got a profile. I was wondering if anyone used it. I use it as my "code profile," if you would call it that. I just house code there that I use so that I can archive it and share my techniques. Anywhere else like this?
  14. I was wondering what happened! Thought my IP address was blocked or something. Posts have been slow today and I think that is why.
  15. Just post the code using the <> toggle in the text editor
  16. There are two options that I know of. Method one is to use CSS. If you put a fixed div around your image, you can make it fluid if you want, you can set that div's overflow you hidden so that anything that is bigger than the div will be hidden. The second method is to use PHP to crop the photo when it is uploaded. You can Google a tutorial on that if you would like to use that method.
  17. Can you reattach the photo of your database? The basic idea is to query the database, loop through the results and echo out the query results inside out the loop along with the HTML you want to output.
  18. Not into the software field. Web development has always been a hobby of mine so I am going to get my masters in web development and maybe teach it in college. Right now I just do SEO analysis. Either way I just want something a like more powerful then the HP Spectre
  19. I know what you mean. The error is saying it is on line 4 and on line 4 he has a different variable outside of this function then he does on the inside. Plus the $_fname isn't anywhere else. It is suppose to be $fname. It is just a typo error
  20. Argh! Unexpected T_String! These are the worst. It means you are missing something or something got added. I noticed something, look here... <?php class FileLogger { protected $_fname; public function __construct($fname=null) { if($fname==null) { Look at your $_fname variable on line 4 and then you have it in the public function differently, $fname. Is that it? It says the error is on line 4. Let me know,
  21. Yeah that is what you need to use. Let me know if it works
×
×
  • 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.