Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. Your missing the semi-colon at the end of the line. $chandle = mysql_connect("localhost", $dbuser, $dbpass); If thats not it, post more code.
  2. It looks like your off to the right start. Change the searchDataBase.php to this: <?php require_once("includes/connection.php"); $searchterm = mysql_real_escape_string($_POST['searchterm']); //I don't see an input in your form named "searchtype", So I'm not sure where this is coming from $searchtype = mysql_real_escape_string($_POST['searchtype']); $query= "SELECT * FROM products WHERE $searchtype LIKE '%$searchterm%'"; $result = mysqli_query($db, $query)or die(mysql_error() . "<p>With query:<br>$query"); while ($row = mysql_fetch_assoc($result)){ echo $row['name'].'<br>'; } ?> I put a comment in the code, I wasn't sure where you pulling a variable from.
  3. After this line mysql_query("INSERT INTO `klanten` (achternaam, voorletters, geboorte, huisnummer, email, postcode, dossiernummer) VALUES ('$achternaam', '$voorletters', '$geboorte', '$huisnummer', '$email', '$postcode', '$dossiernummer')"); Add this: header("Location: www.your-url.com");
  4. Take a look at this post: http://www.phpfreaks.com/forums/index.php/topic,95426.0.html
  5. Whats the error? This line $'city = $info['city']; Should be $city = $info['city'];
  6. Your going to want to use the exec() function
  7. You just need to add "LIMIT 3" to the end of your query. Here is an example: SELECT * FROM table ORDER BY DESC LIMIT 3
  8. <?php $query = mysql_query("SELECT COUNT(*) FROM table")or die(mysql_error()); $num = mysql_num_rows($query); echo "$num People have signed up"; ?>
  9. I think your $search variable is empty, make sure it actually has a value.
  10. Put a die at the end of your queries, like this: <?php $query = mysql_query("SELECT tblLodges.strLodgeName, tblLodges.intLodgeNumber, tblLodges.strDistrictName, tblLodges.strLodgeMailingCity, tblLodges.strLodgeMailingPostCode, tblLodges.strLodgeCounty, tblOfficers.strOfficerTitle, tblOfficers.strFirstName, tblOfficers.strLastName, tblOfficers.BusinessPhone, tblOfficers.PersEmail FROM tblLodges LEFT JOIN tblOfficers ON tblLodges.lngLodgeID = tblOfficers.lngLodgeID WHERE $metode LIKE '%$search%' LIMIT 0, 50")or die(mysql_error());
  11. From this url verify.php?code=d98fac0201ebe4e28b293ea9791293e4 To grab what you want, you would just do this <?php $code = $_GET['code']; echo $code; //Will print "d98fac0201ebe4e28b293ea9791293e4" ?> Does that answer your question? I'm not exactly sure what your trying do accomplish with your IF statement.
  12. You never close this if statement if (mysql_num_rows($query)) { So change the bottom of your code to this <?php if (mysql_num_rows($query)) { while ($row = mysql_fetch_array($query)) { $variable1=$row["strOfficerTitle"]; $variable2=$row["strFirstName"]; $variable3=$row["strLastName"]; $variable4=$row["PersEmail"]; $variable5=$row["BusinessPhone"]; //table layout for results print("<tr>"); echo "<tr align=\"center\" bgcolor=\"#EFEFEF\">\n"; echo "<td class=\"td_id\">$variable1</td>\n"; echo "<td class=\"td_id\">$variable2</td>\n"; echo "<td class=\"td_id\">$variable3</td>\n"; echo "<td class=\"td_id\">$variable4</td>\n"; echo "<td class=\"td_id\">$variable5</td>\n"; print("</tr>"); } } ?> Also, why is your very last line of code opening PHP tags? Unless that wasn't your entire script? Also, I don't really see the point of this line: $results=mysql_query($query);
  13. Can you post the code to your append_file() function?
  14. You need to use a while loop, like this: <?php $Host = "localhost"; $User = "root"; $Password = "******"; $DBName = "website"; $TableName = "members"; $Conn = mysql_connect ($Host, $User, $Password) or die ( "MySQL Error!" ); //now lets do the query $Query = "SELECT * from $TableName"; $Result = mysql_db_query ($DBName, $Query, $Conn) or die ( "MySQL Error 2!" ); ?> <table border="1" align="center"> <tr> <td>First Name</td><td>Last Name</td><td>Email</td><td>User Level</td><td>Delete</td><td>Edit User</td> </tr> <?php while ($data=mysql_fetch_assoc($Result)){ echo '<tr>'; echo "<td>{$data['fname']}</td><td>{$data['lname']}</td><td>{$data['email']}</td><td>{$data['level']}</td> <td><a href='delete.php?fname={$data['fname']}'>Delete User</a></td> <td><a href='edit.php?fname={$data['fname']}'>Edit User</a></td>"; echo '</tr>'; } ?> </table>
  15. Are you trying to actually print the name of the variable and not actually the value it contains? You would do this <?php echo '$databaseresult';
  16. Can you post the ENTIRE script?
  17. Do you not know which script is getting the error? Look at the URL to figure it out, then go into your FTP and open it.
  18. Hmmm, are you positive thats the right script?
  19. Change mysql_query("INSERT INTO madden ($fields) VALUES($values)") or die(mysql_error()); To <?php $query = "INSERT INTO madden ($fields) VALUES ($values)"; $result = mysql_query($query)or die(mysql_error() . "<p>With Query:<br>$query"); ?> Copy and paste whatever you see on the screen. If it doesn't show anything different, then it's the wrong query.
  20. Nope, your going to have to use javascript for that =]
  21. Nope, it's going to be a query. Most likely and INSERT one.
  22. In the code of that page, so your gonna have to look through it.
  23. That means that you forgot to add a variable in like an insert query. Here is an example: INSERT INTO table_name (col1, col2, col3) VALUES ('$val1', '$val2', MISSING VALUE) So there are 3 columns and only 2 values. So make sure it is even on both sides.
  24. Well, if it's not changing the information on your site after physically changing the information in the database then you are probably changing the wrong data. Have you looked at the code and made sure you are in the right table? Unless you post some of the code it's hard to tell whats going on, but from the looks of it you are in the wrong table.
×
×
  • 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.