Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Mudsaf

  1. Mudsaf


    $query .= "OR keywords LIKE '%$each%' "; }} $query = mysqli_query($con, $query);$numrows = mysqli_num_rows($query); I think you should do it like this $query .= "OR keywords LIKE '%$each%' "; }} $result = mysqli_query($con, $query);$numrows = mysqli_num_rows($result);
  2. Mudsaf

    video upload

    W3schools.com ~ Tutorial http://www.w3schools.com/php/php_file_upload.asp Tizag ~ Tutorial http://www.tizag.com/phpT/fileupload.php If you want video players etc you need to merge that with SQL.
  3. index.php <?phpsession_start();if (isset($_SESSION['username'])) {//User has logged inecho "Logged in as: " . $_SESSION['username'];} else {echo "<h3>Login to have access on page.</h3><form method='post' action='login.php'>Username: <input type='text' name='user'>Password: <input type='password' name='pass'><input type='submit' value='Login'></form>";}?> login.php <?phpsession_start();$user = "John"; //Example username$pass = "125Eas%"; //Should do this with SQL but easier to understand with phpif (!isset($_SESSION['username'])) {if (isset($
  4. Xampp has folder "htdocs" which is related to www or public_html folder and this folder would have all your website files inside it. You can check the info at apache (httpd.conf) and search this line below. DocumentRoot /var/www/html You might have different location on "DocumentRoot" but its your htdocs folder.
  5. Without PHP & SQL you can't really make safe login for your page. Also form GET method isn't secure way to do it. Here is some tutorial how to make login with SQL: http://www.phpeasystep.com/phptu/6.html
  6. <html><head><style>.co1 {background-color:#F1F1F1;padding:2 4 2 4;border:groove;border-width:thin;}.co0 {background-color:#DBDBDB;padding:2 4 2 4;border:groove;border-width:thin;}.toptd {font-weight:bold;border:groove;border-width:thin;padding:2 4 2 4;}a { text-decoration:none; }</style><script src="lightbox/js/jquery-1.10.2.min.js"></script><script src="lightbox/js/lightbox-2.6.min.js"></script><link href="lightbox/css/lightbox.css" rel="stylesheet" /></head><body><form action='/stash/index.php' method='GET'><input typ
  7. I'm using MySQLi PHP receive if ($res_ginfo = $con->query("SELECT <column1>, <column2> FROM <table> WHERE <column1> = '" . $row['<data1>'] . "'")) {$rows = mysqli_num_rows($res_ginfo);if ($rows == 1) {$row_ginfo = $res_ginfo->fetch_assoc();echo "<td style='text-align:center;' class='co" . $count . "'><a href='" . $row_ginfo['<data2>'] . "' data-lightbox='" . $row['item'] . "'><img width='16' height='16' src='" . $row_ginfo['<data2>'] . "'></a></td>";} else {echo "<td style='text-align:center;' class='co$count
  8. But shouldn't prepared query prevent from SQL injections already? if ($stmt = $con->prepare("INSERT INTO <table> (<column1>, <column2>, <column3>) VALUES (?,?,?)")) { And the SQL-data just removes 1 table td codes. <td></td>
  9. Hello, i'm wondering how my single quote @ SQL-table can break my code. Example: Who's that? <-- Breaks code Example2: Whos tat? <-- Doesn't break code Tried below htmlspecialchars (with ent_quotes and without) htmlentities(-ll-)
  10. I recommend you to check your upload speed at speedtest.net & make sure you have at least 5MB upload bandwith. If your website will get alot of traffic/downloads it would lag you & all others who's visiting your server. Good hosting websites for free & paid. Free: http://byethost.com/ Paid: https://ifastnet.com/portal/
  11. Wondering if Primary key's are made for SQL clients, so they know how to work with rows. Example if i delete row at SQL it says. DELETE FROM items WHERE id = '1'DELETE FROM items WHERE id = '5'DELETE FROM items WHERE id = '6'DELETE FROM items WHERE id = '8'
  12. Mudsaf

    HTML & Php

    Yea i usually use .PHP also, unless i have to work with styling and i don't have apache server nearby. I love the PHP include so i don't have to write same code dozen times to every page.
  13. Well i'm updating it for company & they'r using font-size instead of zooming. The website page width = 800px (which has sidebar included, i have like 500px to work around) so content will go to next line if increased text-size. I assume i have to do it the ugly way because it was their company's request. >_>
  14. Hello, i've got website to edit and wondering do you guys support the "IE" View->Text Size->Largest option? I could make the website look alot better without supporting it.
  15. Alright i think i have to edit margin from left, was just wondering the align change at div. Was it too width because of the margin left? Anyway changed it to margin: 0 auto;
  16. Hello, i'm wondering how to keep the div positions sticky even when adding content to them. <html><head><meta charset="utf-8"/><style>div {border:groove;border-width:thin;}#left-navi {width:200px;height:400px;display:inline-block;text-align:center;padding:2px;}#right-navi {width:150px;display:inline-block;height:400px;padding:2px;text-align:center;}#mid-navi {display:inline-block;width:800px;height:400px;padding:2px;}#content {margin-left:150px;width:1178px;padding:15px;}h2 {margin:5px 2px 10px 2px;}</style></head><body><div id="content"><h2&
  17. Thanks for all replies, i will try those when i'll get back to home.
  18. Figured out now, made single $row variable and pasted the 4th one up there & ignored it on while loop, nvm didin't work >_>
  19. Hello, how i can get certain value from while loop to top of the list? I don't wanna touch SQL-query. Example my while loop result 12345 What i want 41235
  20. Lol i actually made working script without knowing it >_>
  21. Hello, i'm wondering how to call php function with some variables sent on the way. Example function runScript($MyVar, $MyData) {echo $MyVar; //Should return 1echo $MyData; //Should return Data}$MyVar = 1;$MyData = "Data";runScript($MyVar, $MyData);
  22. Note: The values "inline-table", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-row", "table-row-group", and "inherit" are not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports the values. http://www.w3schools.com/cssref/pr_class_display.asp See examples what it does at here http://www.brunildo.org/test/inline-block2.html
  23. Mudsaf

    Website logging

    Yea some kind of policy page sounds good, but i assume that at my page there is nothing to hide since all data would be away in password protected folders or at database. My page currently has Shoutbox which kind a "logs" anyways even tho you should because the shouts will be always in database either hidden or visible. By the logging at the moment i meant mostly SQL-errors and that kind of logging.
  24. Mudsaf

    Website logging

    I'm wondering can you really have too much logging on your website. Currently i'm logging data with SQL database logging Mail function to own error log email <made this because SQL might be down> Wondering should i make ip-related .txt file logging also if mail & sql servers are off?
  • Create New...