Search found 6 matches

by le_fou
Sat 24. Mar 2007, 16:16
Forum: phpwcms Support Deutsch
Topic: Problem mit Umlauten
Replies: 1
Views: 1465

Problem mit Umlauten

Hallo, ich habe den thread search a different database gepostet.

Wenn ich das script search.php selbst aufrufe, erhalte ich alle Umlaute als Umlaute korrekt angezeigt.

Wenn ich aber das script aus meiner wcms-site heraus starte (wo das included ist) macht der mir aus allen Umlauten "?".

Hat jmd ...
by le_fou
Fri 23. Mar 2007, 15:10
Forum: phpwcms Support English
Topic: search a different database
Replies: 4
Views: 1796

So, for those who'd like to search a different database using this script, I will clearly post it here.

the search-script itself is called search.php
<?php

mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("bibliographie") or die(mysql_error());

if(isset($_GET['s ...
by le_fou
Fri 23. Mar 2007, 14:20
Forum: phpwcms Support English
Topic: search a different database
Replies: 4
Views: 1796

to answer a solve by myself: i am now using


<html>
<form method="get" action="index.php">
<input type="hidden" name="id" value="0,166,0,0,1,0">
<input type="text" name="s">
<input type="submit" value="Search">
</form>
</html>


and it works!
by le_fou
Fri 23. Mar 2007, 13:51
Forum: phpwcms Support English
Topic: search a different database
Replies: 4
Views: 1796

also trying

Code: Select all

$komplett = "id%3D0%2C166%2C0%2C0%2C1%2C0%26s";
$komplett2 = "id=0,166,0,0,1,0&s";
echo urlencode($komplett);
//echo urldecode($komplett);
with both komplett and komplett2 didnt return a usable answer.
by le_fou
Fri 23. Mar 2007, 12:30
Forum: phpwcms Support English
Topic: search a different database
Replies: 4
Views: 1796

even by adding a new function hex2str

Code: Select all

function hex2str($hex)
{
  for($i=0;$i<strlen($hex);$i+=2)
  {
    $str.=chr(hexdec(substr($hex,$i,2)));
  }
  return $str;
}
and later the command

Code: Select all

echo hex2str("3D");
e.g. for printing the "=" it returns a "%3D" as URL.
by le_fou
Wed 21. Mar 2007, 18:25
Forum: phpwcms Support English
Topic: search a different database
Replies: 4
Views: 1796

search a different database

Hi folks, i wanna support my visitors with an additional search-form to work with a different database called bibliographie:

In wcms i have included the search-php by

[PHP]
include('search.php');
[/PHP]

which works well. The search.php looks like this:


<?php

mysql_connect("localhost", "root ...