<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
$getLima=$_POST['Onoma'];
include "connect.php";
$rsSelectOnomata=mysql_query("SELECT * FROM titloslimmatos WHERE LimmatikosTypos='$getLima'");
//$result=mysql_query($query);
while($rsRow=mysql_fetch_assoc($rsSelectOnomata)) {
echo $rsRow[titloslimmatos.LimmatikosTypos];
$rsRow[titloslimmatos.MerosLogoy];
$rsRow[titloslimmatos.YfologikoEpipedo];
$rsRow[titloslimmatos.GlwssikoEpipedo];
//$rsRow[extralimmatikoitypoi.ExtraLimmatikosTypos];
//$rsRow[extralimmatikoitypoi.YfologikoEpipedo];
//$rsRow[Simasia.XrisiLeksis];
//$rsRow[synonimo.Synonimo];
//$rsRow[synonimo.Example];
//$rsRow[antitheto.Antitheto];
//$rsRow[antitheto.Example];
}
}
else {
?>
<html>
<body bgcolor="#FFFFCC">
<h3><center><b>Δώστε το λήμμα που ψάχνετε</b></center></h3>
<table>
<form method="post" action="<? echo $PHP_SELF ?>">
<input name="onoma" type="text">
<input type="Submit" name="set" >
</form>
</table>
</body>
</html>
<?
}
?>
anna05
0
Newbie Poster
Recommended Answers
Jump to PostMight help to state what the problem is. I don't want to sit here looking through your code without knowing what I am looking for.
Also, use code tags.
Jump to PostPrint and execute the query in phpmyadmin / mysql console. Check the error message.
OR
Use$rsSelectOnomata=mysql_query("SELECT * FROM titloslimmatos WHERE LimmatikosTypos='$getLima'") or die(mysql_error());
This will print the error message on failure. This is good for testing purpose (and not in the production environment as it exposes …
Jump to PostWhat nav33n said.
Also, if you want to search for values which I guess you will do for a dictionary, look into the LIKE operator for your SQL query.
Jump to PostYeah. You don't have
mysql_select_db("Databasename");
in your script.
All 13 Replies
Will Gresham
81
Master Poster
anna05
0
Newbie Poster
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
Will Gresham
81
Master Poster
anna05
0
Newbie Poster
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
ShawnCplus
456
Code Monkey
Team Colleague
anna05
0
Newbie Poster
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
artsist
0
Newbie Poster
ShawnCplus
456
Code Monkey
Team Colleague
anna05
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.