Jump to content

izzy

Members
  • Posts

    31
  • Joined

  • Last visited

  • Days Won

    1

izzy last won the day on April 17 2015

izzy had the most liked content!

Profile Information

  • Gender
    Not Telling

izzy's Achievements

Member

Member (2/5)

1

Reputation

  1. The problem was not the query but it was the database fields. For some reason these fields were set as BLOB. When i converted them to TEXT the problem was solved. BLOB fields can not be case-insensitive. I thank you all for your help. Problem solved :-)
  2. Unfortunately this did not solve the problem. I already had a *_ci collation set for the database. I could not succeed in setting a lowercase command for the full text example you gave me. (that's all me.. i know :-( but still it didn't solve the problem) In the first example i have the exact same outcome as before. The text in the first field returns the right records. Yet the other fields don't return records when searching for a word that contains a captital letter.
  3. Hi, My search query will not return any records when i search for words that are entered into my database with a capital letter. The problem seems to be that i am searching in 3 different database fields and only one field returns records containing a capital letter. here is the an example of the code: $qeury = SELECT * FROM table WHERE LOWER(field_1) OR LOWER(field_2) OR LOWER(field_3) LIKE '%$search%' ORDER BY date The search works well on field_1. When i enter a search that i know is in one of the other fields and contains a capital letter then there is no match. field_2 and field_3 are not converted to lower-case for some reason. Your help will be greatly appreciated!
  4. I am trying to get my language selection to work by using a dropdown menu and saving the selection in a session variable. It will not switch the language and just stay on the default language. Even if the default language is changed and the script uploaded again the language will not change untill the browser is closed and openened again. It seems like the value in the session does not change. Thanks in advance!! Here is the code. It might be a mess by now because i have tried so many things. <? if (isset($_SESSION['lang'])){ $lang = $_SESSION['lang']; } else if (isset($_POST['langselect'])){ $lang = $_POST['langselect']; } else if (isset($_GET['langselect'])) { $lang = $_GET['langselect']; } switch ($lang) { case 'nederlands': $_SESSION['lang'] = 'nederlands'; include ("nl_lang.php"); break; case 'enlish': $_SESSION['lang'] = 'enlish'; include ("eng_lang.php"); break; default: $_SESSION['lang'] = 'nederlands'; break; } langheader(); ?> <div align="right"> <select name="langselect"> <option value=<?""$lang""?>>Language selection</option> <option value="english">Enslish</option> <option value="nederlands">Nederlands</option> </select> </div>
  5. Thanks for your feedback and answers. brotherZ, What you mention is the route i was thinking about too. Do you have an example of how to get the values from an external file?
  6. Hi guys and gals, I would like to make my site a multi language site. As this might involve a lot of work i prefer to only have to do this once and do it right. So i would like to have suggestions on how to do this the right way so that: * visitors can easily change the language of the site * other languages can easily be added when needed * this function does not make the website slow in any way Any and every sugestion is welcome. Thanks in advance!!
  7. Thanks a lot!!! Greetings, Izzy
  8. Hi, I've got a script that opens a url that is placed in my database. The only thing is that it opens in the same window as my site. It replaces my site. How can i make the page open in a new window? here is the script... <table width="300" border="0"> <tr>   <td class="lightheader">     <span><?php echo "<a href=\"".$link['url']."\">"?><strong><?php echo $link['name']?></a></strong></span>   </td> </tr> <tr>   <td class="footer">     <span><?php echo $link['description']?></span>   </td> </tr>       </table>     <td width="200">          <span><?php echo "<a href=\"".$link['url']."\">"?><strong><?php echo $img?></span>   </td> </table>
  9. I'll chek it out. Thanks for the info. Greetings, Izzy
  10. How can i stop people from getting to my database by entering php/mysql code into the forms i use on my site. Think of ... login field registration form search field etc. Greetings, Izzy
  11. Sorry everyone... Database connection wasn't good... :-[
  12. Thanks But still nothing has changed. I keep looking over the scripts but i can't see the problem  ??? >:( HELP !!!
  13. I'm trying to make a very simple form that places information in my database. I used a part of an existing script i have made some time ago. All i'm getting is a blanc page once i submit the form. Can someone tell me what is going wrong? Here is the code from the different scripts. This is the form: <html> <head> <title>Add a link or banner to the directory</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="hotbabevote.css" type="text/css"> </head> <body bgcolor="#FFFFFF" text="#000000" class="stdheaderconfig"><p><br> <p><br>   <span class="infosmallconfig">Use this form to add you link/banner to the directory. </span></p> <form action=entry.php method=post enctype="multipart/form-data">   <table width="700" border="0" cellspacing="2" cellpadding="2">     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">Last Name:</td>       <td width="564">         <input type="text" name="lastname" size="45">       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">First Name:</td>       <td width="564">         <input type="text" name="firstname" size="45">       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">Company Name:</td>       <td width="564">         <input type="text" name="company" size="45">       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">Company URL:</td>       <td width="564">         <input type="text" name="companyurl" size="45"><br>         (ie.  http://www.myfashionshop.com )       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">Business Description:</td>       <td width="564">         <input type="text" name="description" size="45">       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">Country:</td>       <td width="564">         <input type="text" name="country" size="45">       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">City/State:</td>       <td width="564">         <input type="text" name="city" size="45">       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">Sales Rep. Name:</td>       <td width="564">         <input type="text" name="repname" size="45">       </td>     </tr>     <tr valign="middle" bgcolor="F9F9F9">       <td class="stdtextconfig" width="122">Banner upload:</td>       <td class="stdtextconfig" width="564">         <input type="file" name="fotopath">       </td>     </tr>     <tr bgcolor="F9F9F9">       <td colspan="2">         <div align="center">           <input type="hidden" name="action" value="insert">           <input type="submit" name="Submit" value="OK">         </div>       </td>     </tr>   </table> </form> <p>&nbsp; </p> </body> </html> here is the script that is supposed to enter the info into the database: //Een verbinding met de database maken include("system/connect.inc.php"); //parameters lezen if(isset($_GET['action'])) $action=$_GET['action']; if(isset($_POST['action'])) $action=$_POST['action']; if(isset($_REQUEST['action'])) $action=$_REQUEST['action']; //Hier worden nieuwe huizen toegevoegd if($action=="insert"){ //parameters lezen $last_name=$_POST['lastname']; $first_name=$_POST['firstname']; $company_name=$_POST['company']; $company_url=$_POST['companyurl']; $link_description=$_POST['description']; $link_country=$_POST['country']; $link_city=$_POST['city']; $rep_name=$_POST['repname']; if($_FILES['fotopath']['size']>0){ //Eventueel nieuwe afbeelding uploaden $source=$_FILES['fotopath']['tmp_name']; $afbeeldingnaam=time() . $_FILES['fotopath']['name']; //URL samenstellen $dest="banners/" . $afbeeldingnaam; $check1=copy($source,$dest); } $link_SQL_insert="INSERT INTO linkdir (lastname,firstname,company,companyurl,description,country,city,repname,fotopath) VALUES ('$last_name','$first_name','$company_name','$company_url','$link_description','$link_country','$link_city','$rep_name','$afbeeldingnaam')"; } Here is the page that is supposed to show the records. //Een verbinding met de database maken include("system/connect.inc.php"); $link_SQL="SELECT * FROM linkdir ORDER BY firstname"; $link_result=mysql_query($link_SQL); //In dit deel worden de gegevens weergegeven while($link=mysql_fetch_array($link_result)){ //afbeelding voorbereiden $img=""; if($link['fotopath']) $img="<img width=150 height=150 src='../banners/" . $link['fotopath'] . "'>"; ?> <table width="410" border="0"> <tr> <td width="100">Last Name: </td>   <td>     <span><?php echo $link['firstname']?></span>   </td> </tr> <tr> <td width="100">First Name: </td>   <td>     <span><?php echo $link['firstname']?></span>   </td> </tr> <tr> <td>Company: </td>   <td>     <span><?php echo $link['company']?></span>   </td> </tr> <tr> <td>Company URL: </td>   <td>     <span><?php echo $link['companyurl']?></span>   </td> </tr> <tr> <td>Description: </td>   <td>     <span><?php echo $link['description']?></span>   </td> </tr> <tr> <td>Country: </td>   <td>     <span><?php echo $link['country']?></span>   </td> </tr> <tr> <td>City/State: </td>   <td>     <span><?php echo $link['city']?></span>   </td> </tr> <tr> <td>Rep. Name: </td>   <td>     <span><?php echo $link['repname']?></span>   </td> </tr>       </table>     <td width="200">          <span><?php echo $img?></span>   </td> </table> <p><p></p></p> <?php } mysql_close ?> Help me please, This is supposed to be simple... :-(
  14. [!--quoteo(post=389195:date=Jun 29 2006, 12:45 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 29 2006, 12:45 PM) [snapback]389195[/snapback][/div][div class=\'quotemain\'][!--quotec--] Also how is <?php echo"$id";?> going to work? How is the $id variable going to be set on the other persons site they post it on? [/quote] Sorry... that part is actually not supposed to be in plain text, that is supposed to echo/display the user id in question. Could you please help me with that too?
×
×
  • 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.