Jump to content

microbert

Members
  • Posts

    32
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

microbert's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thank you all for your help, it worked fine. I used the css media functions and it worked perfect.
  2. I think that the best solution is the css media, but I never used it and couldn't make it work. does anyone has used this type of command before? how to choose which part of the code you will show on the page?
  3. Ok, i have tried to use @media but how can I include a php file depending on the screen size? I have 2 files: 1. footer.php 2. footer_mobile.php
  4. Hi, I am trying to make a page where the footer is loaded according to the screen size, so if someone is accessing the website via a tablet will be a footer, if it is from the computer, there will be another footer. my problem is that although it is recognizing the windows width, it is not changing the footer accordingly. this is my code: $width = "<script>document.write(window.innerWidth);</script>"; if ($width < 900) { include("footer_mobile.php"); } else { include("footer.php"); } for some reason it is always loading the else footer even though the windows with changes. I added echo"$width" ; and the result of the variable was fine. does anyone know what the problem is cause it is driving me crazy?
  5. And if I decide to make it an auto-complete - meaning that the result are display as a pop out menu? is that better ? and it is possible?
  6. It is for a Like query and it going to generate a new page with search result.
  7. Hi, I am trying to make an autocomplete search bar - so for example if want to search for "Sony D3256 Camera" and I type "Sony camera" in the search bar, it still suggest the "Sony D3256 Camera". The ones that I found on blogs and forums are the ones that shows the suggestion until you break the sequence of the name. I am using PHP and MySQL Is this possible, or cannot be done?
  8. can you please tell me what PDO is and how to use it? sorry but I am a beginner
  9. This is my code for the form: <form action="sqlquery.php" method="GET"> <textarea name="SQLquery" rows="20" cols="40"></textarea> <br /> <input type="submit" name="SQLexecute" value="Execute Query" style="height: 30px; width: 350px; font-size: 16px" /> </form> and this is the submit form: <!DOCTYPE HTML> <html> <body> <?php mysql_connect("server", "username", "password") or die("Error connecting to database: ".mysql_error()); ?> <table width="100%" cellspacing="0" cellpading="0" valign="top" border="0"> <tr> <td> <?php $query = $_GET['SQLquery']; if($query == "") { echo(" <table align='center' border='1' width='1000px' bgcolor='#FFFFFF'><tr> <td align='center' width='150px'> <font size='+2'>Opps! You forgot to enter query.</font> </td> </tr></table> "); } else { echo(" <table bgcolor='#FFF' align='center' border='1' width='1000px' cellspacing='0' cellpading='0'> <tr> <td align='center' width='150px'><b>Picture</b></td> <td align='center' width='530px'><b>Description</b></td> <td align='center' width='170px'><b>Stock</b></td> </tr> "); $sql = mysql_query("$query"); while($data = mysql_fetch_array($sql)) { $scode = $data['code']; $sname = $data['name']; $sqty = $data['qty']; $sDateModified = $data['DateModified']; $sDateCreated = $data['DateCreated']; include("ListView.php"); } $i--; $x++; } ?> </td> </tr> </table> </body> </html>
  10. I have tried that but it is giving me an error:
  11. Hi, you all know that from phpmyadmin you can run an SQL Query for example "select * from table where code like '0011'" now my question is can I add a query box like this directly into my website, so I can run a query without login into phpmyadmin? your help is very appreciated since I cannot make this happen. thanks
  12. To be fair I have tried to explode the keywords into an array and then run a look to make the sql command but it didn't work. I was hoping there is another way to make this work.
  13. My Database id InnoDB and it is not supported with FULLTEXT Search. Is there another way to do this?
  14. But is there a way to search word by word?
  15. Hi, I am trying to build a search page that searches MySQL database. I managed to do the search, but I have a small problem when giving the query. Ex: can someone help me out since I am loosing my mind on this. my sql command is: $SQL = mysql_query("SELECT * FROM stocks WHERE `name` LIKE '%$keywords%' order by code"); help is very appreciated
×
×
  • 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.