urtrivedi 276 Nearly a Posting Virtuoso

check your query in phpmyadmin, does it gives proper result?

urtrivedi 276 Nearly a Posting Virtuoso

White screen usually means syntax error in php code.

uncomment line 20 if ($query)
becasue you can not use ELSE (line 24) without IF

urtrivedi 276 Nearly a Posting Virtuoso

remove line 2 from your code
Mysql Connect | mysql_connect("host","username","password");

urtrivedi 276 Nearly a Posting Virtuoso

Your query looks fine. what is the problem you are facing

urtrivedi 276 Nearly a Posting Virtuoso

Following query will show first even ids in desc and later it will show odd ids in asc

SELECT * FROM tablename  ORDER BY case when MOD(idcolumnname,2)=0 then -1 else 1 end * idcolumnname asc
urtrivedi 276 Nearly a Posting Virtuoso

I assume that you working on php

If you want to put confirmation page in between, and on confirmation, send it to real handler page.

YOu can echo output using post array

<?php
echo "Name: " . $_POST['name']."<br>";
echo "Address: " . $_POST['address']."<br>";
echo "contact: ". $_POST['contact']."<br>";

?>
<form name=frm id=frm action='handler.php' method ='post'>
<input type=hidden name='name' value ='<?php echo $_POST['name']?>'>
<input type=hidden name='address' value ='<?php echo $_POST['address']?>'>
<input type=hidden name='contact' value ='<?php echo $_POST['contact']?>'>
<input type=submit name='Submit' value ='Confirm'>
</form>
urtrivedi 276 Nearly a Posting Virtuoso

What do you mean by problem?
Tell us what exaclty is not working or what is happneing?
How you set value in variable $saluran

urtrivedi 276 Nearly a Posting Virtuoso

1) If You, try to open any login page in any website.

2) You enter webaddress in address bar in your browser (its your client). Rigth now ur browser is blank.

3) when you press enter , your browser sends request to the server with page name you want to open (here we want login page)

4) So server will find code page (e.g php, asp, aspx, jsp) there server code is writtten , that what is to be send to client. and some html, css, and js code is sent to browser. all this code is formated using server side lanaguages and client side code is generated dynamically for browser.

5) Now browser will receive code from server and render on your display. Now control is with browser and server will wait for ur next request.

6) You will find some checks here on your page. You can see client side code in your browser by rightclick and view source. this all is client side code (html, css)

7) If you submit without entering userid password, you will find one popup or messsage instantly that enter userid password, (using js) this is still done at client side, so browser is basically client. which helps you to communicate with the webserver (yahoo.com, or any other like that )

8) Now when you fill all details and press submit.

9) Again your server is called and ur details are send to server. And client side code contains the address of page …

urtrivedi 276 Nearly a Posting Virtuoso
$query="insert inot residents_payment (uid,rate) select uid, levy from residents ";

thats all you need to do, you can do directly in phpmyadmin, if it is to be run once only.

urtrivedi 276 Nearly a Posting Virtuoso

First of all you must stop directory browsing (this is not related to your problem, its just security measure).

Now I can see test2.html, test.html and default.php.

Which one you are working on whose code you given above.

your server also adding javascript code for analytics, which is giving error in the bottom of page.

urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

I would suggest to keep filepath in database and upload that file in file system of server.

Szabi Zsoldos commented: same +4
urtrivedi 276 Nearly a Posting Virtuoso

it is mi for minutes not mm

YYYY-MM-DDThh:mi:ss

urtrivedi 276 Nearly a Posting Virtuoso

I think you should put two timestamp columns book_from and book_upto
So that it will help you to easily query any conflict in booking very easily.

urtrivedi 276 Nearly a Posting Virtuoso

refresh will only work with timer. If you dont use timer. page will be updated only once at the time of loading

urtrivedi 276 Nearly a Posting Virtuoso

you can not put quotes around column name (I assume from and to are column names)

write as

where from='4' and to='1' 
urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso

phpmyadmin limits record at a time. most of time 30 records at same time
you wil never need to see all togehter, better u filter of ur choice
and below u find pages to move back and forth

urtrivedi 276 Nearly a Posting Virtuoso

how somebody can assume what problem u are facing with just reading above 2 lines.

post deatils of problem

urtrivedi 276 Nearly a Posting Virtuoso

you need to lean html forms and php form handler

http://www.w3schools.com/php/php_forms.asp

urtrivedi 276 Nearly a Posting Virtuoso

Session_start function is usually called in begning of page or from any common file which is included in all page in begning.

Take out it from classes

urtrivedi 276 Nearly a Posting Virtuoso

You can add custome page on wordpress and you can match your page theme with the wordpress theme.

urtrivedi 276 Nearly a Posting Virtuoso

learn basics first.
try w3schools.com

urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso
SELECT * FROM Table
WHERE  (convert(varchar,DateDeleted,1)< '2014-02-12'
OR DateDeleted IS NULL)

You should always use proper datatime datatype when value is date,
Here you have to always convert varchar to date now

refer following for sql date conversions
http://sqlusa.com/bestpractices2005/sqlserverstringtodate/

urtrivedi 276 Nearly a Posting Virtuoso

But i suggest not to use javascript to veriy captcha, always check in handler php code.

urtrivedi 276 Nearly a Posting Virtuoso

first you have to create page for senior to approve the record status

where they set status to approve or unapprove, all pending records

same status can be displayed to junior login.

a href is only html link. you can not achieve updation of database using html links.

YOu need to create process page as I suggested in first line of this message

post and get are 2 methods in which html form elements are submitted to post and get php arrays, which can be processed by php handler code to update database.

urtrivedi 276 Nearly a Posting Virtuoso

what is structure of $tblname and what is primary key in that table

urtrivedi 276 Nearly a Posting Virtuoso

I guess you must be having status or approved column in your table
you can add same column in your query and display it

SELECT student.name, student.matric, student.session, data.title, data.day, data.month, data.year, data.hour, data.minute, data.timing, data.status
urtrivedi 276 Nearly a Posting Virtuoso

before exeuctiong query output the prepared query. copy it and run in database administration tool. check do you find any error there

<%
string query = "update pharmacy set mname='"+a2+"',desc='"+a3+"',amount='"+a4+"'where pid='"+a1+"'";
%>
<%=query%>

<%
int k = smt.executeUpdate(query);
%>
urtrivedi 276 Nearly a Posting Virtuoso

I do not agree with your html layout or I am not able to understand what you trying to achieve.

You are using same name coderef[] for different kind of of datatype, Usually html php array is used for same kind (datatype) of column for handling multiple values.

So I would suggest you to first use unique names of columns, changed handler accordingly

<li>
        <label name="idPlanRev"> Plan Review No:</label>
        <input name"planReviewId"id="planReviewId"  value="<?php  echo $id_plan_review;?>"/>
        <label name="emply"> Employee:</label>
        <input name"emply"id="emply" value="<?php echo $_SESSION['contact_id'];?>"/><!---->
        <label name="codeRef"> Code Reference:</label>
        <input name="codeRef" id="codeRef" type="text"  value=""/> 
        <label name="comment"> Comment:</label>
        <input name="comments" id="comments" type="text"  size="60" value=""/>
        <label name="date">Date:</label>         
        <input name"date"id="date" type="date" value="<?php echo date('Y-m-d');?>"/><!---->
        <input type="button" id="add" value="Add Line"/>
    </li>        
urtrivedi 276 Nearly a Posting Virtuoso

I always compare dates in mysql query insteal of in php. I suggest you to do same. I feel handling dates is little complicated in php specially for comparision.

$query = "SELECT *  FROM  pinjaman  WHERE statusPinjaman = 'Pinjam' AND NOW() >= tarikhPulang";

I guess you do not need any if else statment, becuase you are already getting records where now()> tarikhpulang

But still you want to get both kind of records, then you can add extra column in your query, and remove part of where clause

$query = "SELECT a.*, case when now>=tarikhpulang then 'Yes' else 'No' end date_expired  FROM  pinjaman a  WHERE statusPinjaman = 'Pinjam' ";

then use new column in if else statment

if ($row['date_expired']=='Yes')
{
}
else
{
}
urtrivedi 276 Nearly a Posting Virtuoso

Oh I overlooked and misunderstood.

But we can help more precisely if you can share your efforts here.

urtrivedi 276 Nearly a Posting Virtuoso

add underscore after dollor sign on light 88

wrong $POST['person_id'];
right $_POST['person_id'];

urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso
urtrivedi 276 Nearly a Posting Virtuoso
window.location='sinfo.php';
urtrivedi 276 Nearly a Posting Virtuoso

try to keep h:/path
not semicolon put it as colon and restart apache service
Though I am not sure

urtrivedi 276 Nearly a Posting Virtuoso

The problem is supervisor id 454-56-768

YOu must insert that first
I have changed sequence of insert

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('454-56-768','Robert','Lewis','17834 Deerfield Ln','Nashville','CA',NULL,'01/Jan/95',NULL,NULL);

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('123-44-345','Jim','Jason','2134 Hilltop Rd',NULL,'CA',NULL,'12/Jun/99',NULL,'454-56-768');

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('454-56-324','Richard','Lewis','34 Washington St','Mansfield','MA',NULL,'01/Jan/99',NULL,'123-44-345');

INSERT INTO Employee_T (EmployeeID, EmployeeFirstName,EmployeeLastName, EmployeeAddress, EmployeeCity, EmployeeState, EmployeeZip, EmployeeDateHired, EmployeeBirthDate, EmployeeSupervisorID)
VALUES('454-56-377','Leon','Williams','55 Washington Bld','Alexandria','VA',NULL,'04/Jan/97',NULL,NULL);
urtrivedi 276 Nearly a Posting Virtuoso

remove , before );

CREATE TABLE Film
(
film_code number(5)PRIMARY KEY,
title varchar2 (200)FOREIGN KEY,
running_time number(3,2) NOT NULL, 
classification varchar2(200)
);
urtrivedi 276 Nearly a Posting Virtuoso

In your file you can read passed get or post variables using php arrays $_GET AND $_POST in your case, its get variable id

Now we set new link in your hangout.php as following

hangout.php

<a href='http://affiliatewebsite.com/join?id=<?php echo $_GET['id']?>' > click here to join </a>
urtrivedi 276 Nearly a Posting Virtuoso

In my view alone html is not capable of doing so.
What is your server side language?

urtrivedi 276 Nearly a Posting Virtuoso

what u have is just first part of code. User page.
Now you need handler page which will take input from about page and should send mail .

your page in html ( i have added mail handler php page in form tag and added button code in bottom)

<form action=mailhandler.php method=post>
    <div class="row half">
      <div class="6u">
        <input type="text" class="text" name="name" placeholder="Name">
      </div>
      <div class="6u">
        <input type="text" class="text" name="email" placeholder="Email">
      </div>
    </div>
    <div class="row half">
      <div class="12u">
        <textarea name="message" placeholder="Message"></textarea>
      </div>
    </div>
    <div class="row">
      <div class="12u">
        <ul class="actions">
          <li><input type=submit value='Send Message'></li>
        </ul>
      </div>
    </div>
  </form>

mailhandler.php (place in same folder as above file)

<?php

$retvalue=mail($_POST['email'], "subject: test mail", $_POST['message']);
if($retvalue)
    echo "mail sent";
else
    echo "problem occured, can not send mail";

?>
urtrivedi 276 Nearly a Posting Virtuoso

if you can buy, try phpmaker , I think it gives what u want.

urtrivedi 276 Nearly a Posting Virtuoso
select customer_id 
, max(case when questions='FirstName' then answer else null end) FirstName
, max(case when questions='LastName' then answer else null end) LastName
, max(case when questions='OrgName' then answer else null end) OrgName
, max(case when questions='Country' then answer else null end) Country 
, max(case when questions='ZipCode' then answer else null end) ZipCode
from tablename group by customer_id
urtrivedi 276 Nearly a Posting Virtuoso

when your condition is based on function result, you need to use having keyword

select grpcol1, grpcol2, count(c3.id) from table1 group by grpcol1, grpcol2 having count(c3.id)>1
urtrivedi 276 Nearly a Posting Virtuoso

Where is the effort?

urtrivedi 276 Nearly a Posting Virtuoso

This mostly happnes when query do not run

I guess you $agentid is not set properly

print query on browser
copy it and run into phpmyadmin, and
check and solver any error there

$strSQL = "SELECT custreg.mobno1, slabpay.ac_no, slabpay.cust_name, slabpay.install_no, GROUP_CONCAT(`slabpay.install_amt` ORDER BY `slabpay.install_no` SEPARATOR ' | ') as installamt FROM slabpay,custreg WHERE slabpay.agent_id=$agentid AND custreg.magentid=$agentid GROUP BY slabpay.ac_no";

echo $strSQL;
die('stop for now');
urtrivedi 276 Nearly a Posting Virtuoso

that means the source url contect is changed

Your current code expects '/input type="hidden" name="Action" id="Action" value="(.*)"/' into the url source, that is now not available

So you have to revisit the url source to find userid

urtrivedi 276 Nearly a Posting Virtuoso
$sql="INSERT INTO admin_actions (action_done, date_accomplished, id_number, complaint_id)   SELECT 'done', current_date(),id_number, complaint_id  FROM complaints WHERE group_id=1";
ms061210 commented: Thank you for your answer. It works! :) +1