Jump to content

Nandini

Members
  • Posts

    160
  • Joined

  • Last visited

    Never

Everything posted by Nandini

  1. Nandini

    About Dialplan

    Thanq i will go through that page. If i have any doubt i will contact u.
  2. Nandini

    About Dialplan

    Hi i am doing a website on Ubuntu using php. My requirement is configure voip dialplan from GUI. But till now i dont have any idea about dialplan. Can any one tell me what is the diaplan and what is it used for and how can i configure. Thanq
  3. Yes exactly. You are correct MasterACE14. After ORDER BY it should fieldname only like 'id' etc. i think.
  4. $rows=mysql_query("select * from table"); $num_rows=mysql_num_rows($rows); $result= mysql_query("SELECT * FROM Table ORDER BY $num_rows DESC");
  5. I dont know exactly what u want to do. But i have a little idea after go through ur code. use the following code <? session_start(); include "include/mysql_connect.php"; include "include/redirect.php"; extract($_POST); $error_colour = "red"; // Must use HTML compatible colour $lang_error = "<center>The following errors were found:</center>"; $lang_user = "<ul style='list-style-position:inside;'><li>Enter user name</li></ul>"; $lang_userexist = "<ul style='list-style-position:inside;'><li>user name already taken</li></ul>"; $lang_fullname = "<ul style='list-style-position:inside;'><li>Enter full name</li></ul>"; $lang_password = "<ul style='list-style-position:inside;'><li>Enter password</li></ul>"; $lang_email = "<ul style='list-style-position:inside;'><li>Enter email</li></ul>"; $query_username = mysql_query("SELECT * FROM members WHERE username='".$_POST['_username']."' "); if (empty ($_POST['_fullname'])) { $error = "1"; $info_error .= "".$lang_fullname . ""; } elseif (empty ($_POST['_password'])) { $error = "1"; $info_error .= "".$lang_password . ""; } elseif (empty ($_POST['_username'])) { $error = "1"; $info_error .= "".$lang_user . ""; } elseif (mysql_num_rows($query_username)>0) { $error = "1"; $info_error .= "".$lang_userexist . ""; echo '<META http-equiv="refresh" content="2;URL=register.php">'; } elseif (empty ($_POST['_emailaddress'])) { $error = "1"; $info_error .= "".$lang_email . ""; } if($error == "1") { $info_notice = "<span style=\"color: " . $error_colour . "; font-weight: bold;\">" . $lang_error . "</span><br>"; if (empty ($submit)) //////here submit means ur form submit button name { $info_error = ""; $info_notice = $lang_notice; } ////////here ur html form <tr><td colspan="2" align="left"><? echo "<span style=\"color:red;\">".$info_error."</span>"; ?></td></tr> (first line in table within form) ////end form } else{ //////ur database like insertion operations } ?>
  6. What is ur question Mr. zelllibin ?
  7. Thanq very much. This is what i want. its working fine. I have used arrays to print. thatsy all values are printing till now. By using ur script its working fine. Thanq
  8. Put ob_start(); at the starting line and put ob_end_flush(); at the end of the line Ur problem will be resolved.
  9. I am doing a website using php and mysql. I want to generate .conf files when click button with names of database values. for example: there is a database table named as "config". In that there is a field "trunkname" that is unique. I want to click .conf files when click submit like extension. trunkname value here.con, etc. If "config" table have 3 rows. Trunknames are value1,value2,value3. Then i the script generate 3 files named as extension.value1.conf,extension.value2.conf and extension.value3.conf files with individual data. I have generated files with my script. But total table data was inserted into each file. but i want to insert individual data into individual file. here is my script. <? $ext_content[] = "; do not edit this file, this is an auto-generated file"; $ext_content[] = "; all modifications must be done from the web GUI"; $ext_content[] = ""; $ext_content[] = ""; $sql_trunkname=mysql_query("select * from sip"); while($row_trunkname=mysql_fetch_array($sql_trunkname)) { $trunk_name[]=$row_trunkname['trunk']; } foreach($trunk_name as $v) { $file_sipext="extensions.$v.conf"; $path_sipext=$dh.$file_sipext; `sudo chmod 777 $path_sipext`; $create_sipext=fopen($path_sipext,"w+"); $ext_content[] = $v;; $data_ext = implode("\n", $ext_content); file_put_contents($path_sipext, $data_ext); fclose($create_sipext); if($create_sipext) { echo "files generated"; } else { echo "files not generated"; } } ?> help me out. Its utgent. Client waiting there.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.