![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 3 Pomógł: 0 Dołączył: 15.01.2011 Ostrzeżenie: (0%) ![]() ![]() |
<?php
include('config.php'); if ($_POST['server'] == 'Server 1') { $db_con = mysql_connect($db_s1_host, $db_s1_login, $db_s1_pass) //or die('<META HTTP-EQUIV="Refresh" CONTENT="0; URL="http://localhost/aotest/index.php?err=1"> '); or die('Nie można się połaczyć: ' . mysql_error()); $db_act = mysql_select_db($db_s1_dbase, $db_con) or die('Nie można się połaczyć z baza: ' . mysql_error()); $db_re = mysql_query('SELECT `user` FROM `users` WHERE `mail` = '.$_POST['mail']) or die('zapytanie: ' . mysql_error()); $rekord=mysql_fetch_assoc($db_re); echo ($rekord["user"]); mysql_close($db_con); } ?> pliki wysyłane z pliku index.php metoda post w pliku config.php mam ustawienia bazy danych login pass itd. error: jaki otrzymuje to testzapytanie: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@wp.pl' at line 1 baza wyglada tak -- phpMyAdmin SQL Dump -- version 2.6.4-pl3 -- http://www.phpmyadmin.net -- -- Host: localhłost -- Czas wygenerowania: 15 Sty 2011, 04:12 -- Wersja serwera: 5.0.91 -- Wersja PHP: 5.2.6-1+lenny9 -- -- Baza danych: `aot` -- -- -------------------------------------------------------- -- -- Struktura tabeli dla `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL auto_increment, `user` text collate utf8_unicode_ci NOT NULL, `mail` text collate utf8_unicode_ci NOT NULL, `pass` text collate utf8_unicode_ci NOT NULL, `status` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; -- -- Zrzut danych tabeli `users` -- INSERT INTO `users` VALUES (1, 'g0nz0', 'gonzo_post@wp.pl', '8a1e6c67838f7a4e5c65c317e4894209', 0); Ten post edytował gonzo_yest_bosSKY 15.01.2011, 04:18:15 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 07:14 |