Jump to content

reza01

Member
  • Posts

    5
  • Joined

  • Last visited

Everything posted by reza01

  1. reza01

    a littel help...

    thank you. but i am a beginner. please help me. please give me a correct code.
  2. Hello... We have a program that it works with one row(p1-->group-->sub_group) that it work correctly. now we want change it. it's output: ($ad_sub_groups). we want add another row in this program that it will have(p2-->group-->sub_group2). how we can change it that it works correctly? that it's output be: ($ad_sub_groups). for guide: sub_group take this array: valid_arr[1] = document.newad.sub_group.value; we want add this variable ($ad_sub_groups2) to our database table. and we want insert an id in the dataBase tables for each sub_groups. <?php include("../config.php"); include("../jdf.php"); mysql_connect($db_server, $db_username, $db_password); mysql_select_db($db_name); $authorized = 1; if ($authorized) { $ad_groups = get_groups2(); $ad_sub_groups = get_sub_groups(); // $ad_sub_groups2 = ???????????????? i don now how fille it. $durations = get_durations(); } else header("location:login.php"); function check_authorization() { session_start(); if (isset($_SESSION['uname']) && isset($_SESSION['upass'])) return true; else return false; } function get_groups() { $query = "SELECT * FROM groups"; $result = mysql_query($query); $groups_html = ""; while (($row = mysql_fetch_array($result))) { $name = $row['Name']; $id = $row['ID']; $groups_html .= " $name "; } return $groups_html; } function get_groups2() { $query = "SELECT * FROM groups WHERE ParentID=0"; $result = mysql_query($query); $groups_html = ""; while (($row = mysql_fetch_array($result))) { $name = $row['Name']; $id = $row['ID']; $groups_html .= "$name"; } return $groups_html; } function get_sub_groups() { $query = "SELECT * FROM groups WHERE ParentID=0"; $result = mysql_query($query); if (mysql_num_rows($result)) { $row = mysql_fetch_array($result); $pid = $row['ID']; } $query = "SELECT * FROM groups WHERE ParentID=$pid"; $result = mysql_query($query); $groups_html = ""; while (($row = mysql_fetch_array($result))) { $name = $row['Name']; $id = $row['ID']; $groups_html .= "$name"; } return $groups_html; } ?>
  3. ...???? ????? ??????? ???????? ?????? ... p 1 group: <?php echo $ad_groups; ?> sub_group: <?php echo $ad_sub_groups; ?> p 2 group: <?php echo $ad_groups; ?> sub_group: <?php echo $ad_sub_groups; ?> p 3 group: <?php echo $ad_groups; ?> sub_group: <?php echo $ad_sub_groups; ?> p 4 group: <?php echo $ad_groups; ?> sub_group: <?php echo $ad_sub_groups; ?> p 5 group: <?php echo $ad_groups; ?> sub_group <?php echo $ad_sub_groups; ?>
  4. ...???? ????? ??????? ???????? ?????? ... insert new p 1 group: <?php echo $ad_groups; ?> sub group: <?php echo $ad_sub_groups; ?> p 2 group: <?php echo $ad_groups; ?> sub group: <?php echo $ad_sub_groups; ?> p 3 group: <?php echo $ad_groups; ?> sub group: <?php echo $ad_sub_groups; ?> p 4 group: <?php echo $ad_groups; ?> sub group: <?php echo $ad_sub_groups; ?> p 5 group: <?php echo $ad_groups; ?> sub group <?php echo $ad_sub_groups; ?> announce text name: : tel: city: Address: link://:http type: free ?????? Duration: <?php echo $durations; ?> Stars: 0 1 2 3 4 5 6 7
×
×
  • Create New...