urtrivedi 276 Nearly a Posting Virtuoso

if you press browser refresh button it is not possible to retain values.

urtrivedi 276 Nearly a Posting Virtuoso

You should keep only one variable lik
SESS_LEVEL user that everywhere, do not user separate variables.

after header function always write exit, to avoid further execution of page

header("xy.php");
exit;
urtrivedi 276 Nearly a Posting Virtuoso
select ad.EmployeeID,
ad.Surname,
ad.Givenname,
ad.Company,
ad.Office ,

BD.EmployeeID,
bd.Company,
bd.Office,
bd.First,
bd.Last
from ad inner join bd on ad.employeeid =bd.employeeid
where (ad.surname<>bd.last or ad.givenname<>bd.first or ad.company<>bd.company or ad.office<>bd.office)
urtrivedi 276 Nearly a Posting Virtuoso

because when u pass "click" variable in fucntion, it overrides global "click". so do it without function variable.

urtrivedi 276 Nearly a Posting Virtuoso

this looks like table view.

Have you created your own form and subforms

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

As far as I know (my attempt failed in past) I think on network drive, you can not host apache server.

So if you have some space in your physical harddrive, there you can assing folder for hosting.

Install Apache
Install PHp
Install Mysql

All msi setups available, for windows platform, on there respetives sites.

urtrivedi 276 Nearly a Posting Virtuoso

design looks fine to me.
try to insert record mananully in table without form, it allows or not?

Later try create new forms using wizard as follows
1) create contact-org link table grid type of form
2) create new contact form with above subform, link with contact id
3) create new org form with one above subform, link with org_id

urtrivedi 276 Nearly a Posting Virtuoso

I will use absolute position styel for all five divs like shown below, just change top left for others

#div1 {
position:absolute;
top:1px;
left:300px;
}
urtrivedi 276 Nearly a Posting Virtuoso

contact (contact_id (pk), contact_name) independent

organistion(org_id (pk), org_name) independent

contact_child(child_id (pk), contact_id (fk), child_name)
child_needs(child_id (fk,pk), child_need_no (pk), child_need_description)

contact_organisation (contact_id (pk,fk),org_id(pk,fk))

when u create form for contact, u can add sumform for organistaion under it

same way when u create for for organistaion , u can add subform for contact

urtrivedi 276 Nearly a Posting Virtuoso

1 One Organisation may have many Contacts;

2 Some Contacts have no Organisation.

these 2 are conflicting needs, you need to decide first on this which is preferrable for you

and by the way what u mean by contacts, its just address or anything else

urtrivedi 276 Nearly a Posting Virtuoso

try without braces
current_date, current_timestamp

urtrivedi 276 Nearly a Posting Virtuoso

You need to learn ajax request,
html page sends request to server on any event with parameters,
there on server you must have some script to handle such request ,
the script will return you some output, that you can reflect on html page,

all this will not need to reload whole page, only part of page is updated.

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

urtrivedi 276 Nearly a Posting Virtuoso

i will not use php ever, I will use mysql stuff to add time and date

insert into table1 (col1,col2,today_date,today_datetime) values ('col1value','col2value',current_date(),current_timestamp())
urtrivedi 276 Nearly a Posting Virtuoso

I hope this is what you are looking for:

select t.* from trans_table t left outer join position_table p on t.trans_id=p.pos_trans_id
where p.pos_trans_id is null
urtrivedi 276 Nearly a Posting Virtuoso

you are overwriting pervious value, keep on appending as shown below, with + before =

document.divfrm.div.value+=d;
document.divfrm.div.value+=sp;
urtrivedi 276 Nearly a Posting Virtuoso

post your code, without code no body can help.

urtrivedi 276 Nearly a Posting Virtuoso

cereal already told you the solution
alter table staff_info add primary key('name','day');

or you can open table structure in phpmyadmin, and check on both column, then click on primary key at the boottom of table structure.

So after doing this, table will not expect same day for any person.

But still such table will have maximum only 7 records for any person, better you do make it name and date (not day) as primary key.

urtrivedi 276 Nearly a Posting Virtuoso

that function if finds new line in string, it renders it to html <br> tag.

urtrivedi 276 Nearly a Posting Virtuoso

I guess you mean foreign key by f-key.

you table structure shows u already using f-key in your cart-table. Here your user_id column in cart-table is f-key because it refers to id column of user-table.

so I am not able to understand why u are confused?

urtrivedi 276 Nearly a Posting Virtuoso

how it is stored in mysql, Is it in one column one row, or all features are in separte record?

If it is strored using textarea (with user manually breking line in textarea) then following trick may work, no need of \n

echo nl2br($features_db);
urtrivedi 276 Nearly a Posting Virtuoso

if I see expected result I guess no need to join tables, you can simple do following query with only layer table

select layer_id, count(*) count from layer group by layer_id
urtrivedi 276 Nearly a Posting Virtuoso

what is structure and relation of poeple with layer table (how layer related to people)

urtrivedi 276 Nearly a Posting Virtuoso
SELECT C.theDate, IFNULL( sum(case when DATE( CAST( H.timeentry AS DATE ) ) is null then 0 else 1 end), 0 ) AS countForDate
FROM calendar AS C LEFT JOIN history AS H
ON C.theDate = DATE( CAST( H.timeentry AS DATE ) )
WHERE YEAR(C.theDate) = YEAR(NOW()) AND MONTH(C.theDate) = MONTH(NOW()) and
C.theDate BETWEEN '2012-12-1' AND '2012-12-07'
GROUP BY C.theDate
ORDER BY C.theDate 
urtrivedi 276 Nearly a Posting Virtuoso

you have to merge show.php and showpost.php in one file

merge 2 qery to one query using union
then one while loop to show contents
use that if condition in that while loop

urtrivedi 276 Nearly a Posting Virtuoso

Messagner is another issue. and networking is different.
What I suggested is to connect 2 pc directly to each other only with simple lan cable.
Now you have to write your messager program.

Then you have to run messanger in both pc and send/receive messages.

urtrivedi 276 Nearly a Posting Virtuoso

1 )conect both with lan wire
2) open tcp /ip in lan addapter seeting

ip address for pc 1
192.168.1.1
255.255.255.0
192.168.1.2

ip address for pc 2
192.168.1.2
255.255.255.0
192.168.1.1

use same numbers

its ready now

urtrivedi 276 Nearly a Posting Virtuoso

instead of doing showpost, showpic

you just do all in one query in one file only

urtrivedi 276 Nearly a Posting Virtuoso

you must set "url" variable in your goto function, it is blank now i guess.

urtrivedi 276 Nearly a Posting Virtuoso

so many datamodel is here available, I hope u will find one for u, or u can see more then one and can make ur own using them.

http://www.databaseanswers.org/data_models/index.htm

urtrivedi 276 Nearly a Posting Virtuoso

I think mod can move this thread to "Business Exchange" category.

Spack you may get better response there

urtrivedi 276 Nearly a Posting Virtuoso

before running query echo its output and run in phpmyadmin or observe prepared query statment

echo $result;

mysql_query($result);

urtrivedi 276 Nearly a Posting Virtuoso
select a.show_type, a.id, a.description, a.updatetime from 
(select 'pic' show_type, colpic_id as id, colpic_desc as description, pictime  as updatetime as description from pictable
union 
select 'post' show_type, colpost_id as id, colpost_desc as description, posttime as updatetime from postable) a
order by  a.updatetime desc

now in php code you u can check our custom show_type column

if ($row['show_type']=='pic')
   echo "<img src........>";
else if ($row['show_type']=='post')
    echo $row['description'];
urtrivedi 276 Nearly a Posting Virtuoso

if u echo $txt7 alone, do it printt anything

urtrivedi 276 Nearly a Posting Virtuoso

write full code how / where u set $txt7

urtrivedi 276 Nearly a Posting Virtuoso

if u have timestamp column in ur table then u can order by that column in reverse order

select * from post order by  post_time desc
urtrivedi 276 Nearly a Posting Virtuoso
echo substr($txt7, 0, 200);
if(strlen($txt7)>200)
    echo "...";
urtrivedi 276 Nearly a Posting Virtuoso

I feel daniweb is only IT forum getting new post every five minute (I assume). No other forum yet I have seen so active. People says man learn from experince, but here you can learn from others precious experience too without paying single penny.

1) I am here to update myself and to learn best practises.
2) I feel I save their precious time when deadlines are close.
3) Yes, I learned so much that I have never learned in a class.
4) Not much
5) Yes

urtrivedi 276 Nearly a Posting Virtuoso

echo nl2br($info['content']);

urtrivedi 276 Nearly a Posting Virtuoso

put echo /table out of while loop (see line 24,25,26 they shold look like following)

}
echo "</table>";
mysql_close($con);
AndreRet commented: Just caught that, thanx bro. +12
urtrivedi 276 Nearly a Posting Virtuoso

but is it available in scope of setBill() function

you may debug or set print/message box in setbill fuction for txtRegistration

urtrivedi 276 Nearly a Posting Virtuoso

your query is fine. just check what you getting in POST array when you submit form place following code in the begining of your page after first php tag

<?php
echo "<pre>";
print_r($_POST);
echo "</pre>";
die('stop to check post array');
urtrivedi 276 Nearly a Posting Virtuoso

txtRegistration field is not having value , before calling function, make uset that field has some value.

urtrivedi 276 Nearly a Posting Virtuoso

what is that 3 times asterisk sign around header function on line 100?
***

urtrivedi 276 Nearly a Posting Virtuoso

what is ur table structure and what is ur purpose(what u want to update with what value)?

Only query is not enough to understand your problem.

urtrivedi 276 Nearly a Posting Virtuoso

html code

<form method='post' action=process.aspx>
<select name=agerange>
<option value='0-5'>0-5</option>
<option value='6-20'>6-20</option>
<option value='21-80'>21-80</option>
</select >
<input type=submit value=submit>
</form>

process.aspx
On pageload add this

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    //you can split agerange with hyphen and get age_from age_to in 2 array elements, i dont know syntax

    //age=Me.Request.Form("agerange").split('-')
    //we assue for e.g 
    //age[0] = 6
    //age[1] =20

    sql="select * 
        from mytable where  CASE WHEN DATEADD(YEAR, DATEDIFF (YEAR, birthdate, CURRENT_TIMESTAMP), birthdate) > CURRENT_TIMESTAMP
            THEN DATEDIFF(YEAR, birthdate, CURRENT_TIMESTAMP) - 1
            ELSE DATEDIFF(YEAR, birthdate, CURRENT_TIMESTAMP) END  BETWEEN " + AGE[0] + " AND " + AGE[1]


End Sub
urtrivedi 276 Nearly a Posting Virtuoso

$ mysql -uusername -ppassword db_name < /fullpath/text_file.sql

urtrivedi 276 Nearly a Posting Virtuoso

again u did not saying whats the problem, facing problem means what?

urtrivedi 276 Nearly a Posting Virtuoso

so try with some search word that return result

urtrivedi 276 Nearly a Posting Virtuoso

match and verify your design here, i hope u find some clue here

http://www.databaseanswers.org/data_models/libraries_and_books/index.htm