User Profile
Collapse
-
could both of you please give me some explaination... ? -
retrieving id using button
Hello
I would like to know if there's any possible code for retrieving
id when we use button. Normally the button itself will only
functions if we use form action, however if i only
used that form action i can't pass the id value to the next particular
form. Therefore, i usually used the link function to retrieve id.
For example :
Code:$result = mysql_query("SELECT * FROM gred",@
-
generate ID for records
[PHP]
<?php
$db = mysql_connect(" localhost", "root","");
mysql_select_db ("sistem bank soalan",$db);
$result = mysql_query("SE LECT * FROM soalan",$db);
$count_emp=mysq l_num_rows($res ult);
if ($count_emp==0)
$id=1;
else
$id=$count_emp+ 1;
echo($id)
... -
problem with "if-else" statement
[PHP]
<html>
<head>
<title>Search Questions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$query = '';
$jenis = '';
$searchtype=$HT TP_POST_VARS['searchtype'];
$searchterm=$HT TP_POST_VARS['searchterm'];
$searchterm=tri m($searchterm);... -
[PHP]
<html>
<head>
<title>Search Questions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$query = '';
$jenis = '';
$searchtype=$HT TP_POST_VARS['searchtype'];
$searchterm=$HT TP_POST_VARS['searchterm'];
$searchterm=tri m($searchterm);...Leave a comment:
-
problem in "if-else" statement
<html>
<head>
<title>Search Questions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$query = '';
$jenis = '';
$searchtype=$HT TP_POST_VARS['searchtype'];
$searchterm=$HT TP_POST_VARS['searchterm'];
$searchterm=tri m($searchterm);... -
nway, could you please explain your SQL statement by refering to my coding that i've post just now?...Leave a comment:
-
<html>
<head>
<title>Search Questions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$query = '';
$query2 = '';
$searchtype=$HT TP_POST_VARS['searchtype'];
$searchterm=$HT TP_POST_VARS['searchterm'];
$searchterm=tri m($searchterm);...Leave a comment:
-
how to connect two tables in the same database
I got a problem to create SQL statement in calling two tables in the same database. I'm trying to call this two tables to view both of the table's content when i'm doing the search process in my system. For example, i have QUESTION field in table Question, and field A, B, C, and D in table Answer. So i would like to call both table to be displayed when i'm doing the search proses. Anybody could help me in making the SQL statement?
No activity results to display
Show More
Leave a comment: