		<form action='new_invoice.php' method='post' data-ajax="false">
                <ul data-role="listview">
	            <li data-role="list-divider">Existing client</li>
                    <li data-role="fieldcontain">
                        <label for="select-choice-1b" class="select">Select</label>
                        <select name="select-choice-1" id="selected_client" data-native-menu="true" onchange='changeclient()'>
                            <option value=""></option>
					<?
						$res=mysql_query("SELECT * FROM `invoices` where client_name!='' group by client_location,client_name order by client_name")or die(mysql_error());
							while($row=mysql_fetch_array($res)){
					?>
						<option value='<?=$row['id']?>'><?=substr(strip_tags($row['client_name']),0,40)?></option>
					<?}?>
                        </select>
                    </li>				
	            <li data-role="list-divider">New client</li>				
					<li data-role="fieldcontain">
                        <label for="name2b">Client name:</label>
                        <input type="text" name="client_name" id="client_name" value="<?=$_POST['client_name']?>" data-clear-btn="true" placeholder="">
                    </li>					
					<li data-role="fieldcontain">
                        <label for="name2b">Client email:</label>
                        <input type="text" name="client_email" id="client_email" value="<?=$_POST['client_email']?>" data-clear-btn="true" placeholder="">
                    </li>					
					<li data-role="fieldcontain">
                        <label for="name2b">Phone:</label>
                        <input type="text" name="client_phone" id="client_phone" value="<?=$_POST['client_phone']?>" data-clear-btn="true" placeholder="">
                    </li>					
					<li data-role="fieldcontain">
                        <label for="name2b">Address:</label>
                         <textarea cols="40" rows="8" name="client_address" id="client_address" placeholder=""><?=$_POST['client_address']?></textarea>
                    </li>
					<li data-role="fieldcontain">
                        <label for="name2b">Location:</label>
                        <input type="text" name="client_location" id="client_location" value="<?=$_POST['client_location']?>" data-clear-btn="true" placeholder="">
                    </li>					
					<li data-role="fieldcontain">
                        <label for="name2b">Payment method:</label>
                        <input type="text" name="payment_method" id="pmethod" value="<?=$_POST['payment_method']?>" data-clear-btn="true" placeholder="">
                    </li>	
					<li data-role="list-divider">Invoice info</li>
					<li data-role="fieldcontain">
                        <label for="name2b">Invoice no:</label>
                        <input type="text" name="invoice_no" id="invoice_no" value="<?=$cfg['invoice_no']?>" data-clear-btn="true" placeholder="">
                    </li>				
					<li data-role="fieldcontain">
                        <label for="name2b">Invoice date:</label>
                        <input type="text" name="invoice_date" id="invoice_date" value="<?=date('d-m-Y')?>" data-clear-btn="true" placeholder="">
                    </li>						
	                    <li>
                        <fieldset class="ui-grid-a">
                                <div class="ui-block-a"><button type="submit" data-theme="b" onclick="top.location='index.php'">Cancel</button></div>
                                <div class="ui-block-b"><button type="submit" name='step1'>Next</button></div>
                        </fieldset>
                    </li>				
			</ul>
			</form>