Jump to content

1981tarun

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male

1981tarun's Achievements

Member

Member (2/5)

0

Reputation

  1. My all Database name , database username, database password and hosting details are copy on the time of making. Because I use Cpanel ("MySql database Wizard") for database making.
  2. I don't know URL allow remote connections How I Check this.... Please tell me Mr. cunoodle2
  3. Dear All Friends, My problem is that on the time of connection via PHP with MySQL I write those code which is write in the book or helping website but unfortunately my php page connection in not establish with MYSQL and give the “Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'username'@'hostname' (using password: YES) in /home/index.php on line 20” I all ready many times check my username, password, host detail and database detail but every time this warning is coming. I write my code here: <?php $dbhost = "www.xyz.co.in"; $dbusername = "username"; $dbpassword = "password"; $dbname = "databasename"; $connect = mysql_connect($dbhost, $dbusername, $dbpassword) or trigger_error("SQL Error", E_USER_ERROR); $db = mysql_select_db($dbname, $connect) or trigger_error("SQL Error", E_USER_ERROR); $result = mysql_query("select * from images"); while($row=mysql_fetch_array($result)) { ?> This code is running on localhost easily. Please tell me by which kind of changes this code can work… Regards
  4. Read this topic http://www.w3schools.com/php/php_ajax_livesearch.asp and http://www.reynoldsftw.com/2009/03/live-mysql-database-search-with-jquery/
  5. Hello friends, In this topic i am getting confuse, and never know how to do work. My problem is that: 1>> I want to send SMS, by PHP pages to mobile. 2>> If user write some Quotation into the calender date, then automatically SMS send to all of those friend with the quatation metter. 3>> All work is store also in MYSQL database also. So please tell me what I do in this case because over the internet only SMS sending code is available, but automatically sms sending option is not given. Please help me then i do this job easily. Thanks
  6. Hello everyone, Once again i need your help this time i want to know that, if I inserting multiple row by single insert query with the help of foreach (loop) then how to insert another cell value according to the name wise so that's way i send my hole code to you. <?php //include configuration file for connection include_once('config.php'); $sql = "select * from CLASS_STUDENT ORDER BY STUDENT_NAME ASC "; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <form name="form1" method="post" action=""> <table style="text-align: left; padding: 5px;" cellpadding="0px" cellspacing="0px"> <tbody> <tr> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Name</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Class</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Section</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Current Date</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Present</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Absent</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Comment</th> </tr> <?php while($rows=mysql_fetch_array($result)) { ?> <tr> <td class="table1"> <? $id[] = $rows['STUDENT_NAME']; ?><? echo $rows['STUDENT_NAME'];?> </td> <td class="table1"> <input name="class[<? echo $rows['STUDENT_NAME']; ?>]" type="text" value="<? echo $rows['STUDENT_CLASS']; ?>"> </td> <td class="table1"> <input name="section[<? echo $rows['STUDENT_NAME']; ?>]" type="text" value="<? echo $rows['STUDENT_SECTION']; ?>"> </td> <td class="table1"> <input name="date[<? echo $rows['STUDENT_NAME']; ?>]" type="text" value="<? echo $rows['PRESENT_DATE']; ?>"> </td> <td id="present"> <input type="radio" name="present[<? echo $rows['STUDENT_NAME']; ?>]" checked="checked" value="PRESENT">Present </td> <td id="absent"> <input type="radio" name="present[<? echo $rows['STUDENT_NAME']; ?>]" value="ABSENT">Absent </td> <td style="text-align: left; padding: 5px; border: 1px #000000 solid; height: 33px;"> <input name="comment[<? echo $rows['STUDENT_NAME']; ?>]" type="text" value="<? echo $rows['COMMENT'];?>"> </td> </tr> <?php }?> <tr> <td colspan="7" style="vertical-align:middle; text-align: center;"><br><br> <input id="Submit" type="submit" name="Submit" value="Insert" style="text-align: center; background-color: #000000; color: #ffffff; border: 1px #000000 solid;"> </td> </tr> </tbody> </table> </form> <?php if(isset($_POST['Submit'])) { foreach($_POST['present'] as $id => $value) { $class=$_POST['class']; $section=$_POST['section']; $date=$_POST['date']; $comment=$_POST['comment']; $sql = "INSERT INTO ATTENDANCE(STUDENT_NAME, STUDENT_CLASS, STUDENT_SECTION, PRESENT_DATE, STUDENT_PRESENT, COMMENT) VALUES ('".$id."', '$class[$value]', '$section[$value]', '$date[$value]', '".$value."', '$comment[$value]') "; $result = mysql_query($sql); } } if($result) { header("location:Tea_home.php"); } else { //print_r ($_POST); echo "Your entry is not completed at this time............."; } ?> My result is comming just like that STUDENT_ID || STUDENT_NAME || STUDENT_CLASS || STUDENT_SECTION || PRESENT_DATE || STUDENT_PRESENT ||COMMENT 231 || PRASHANT KUMAR || || || 1/1/0001 12:00:00 AM || ABSENT || 230 || JYOTI NANDA || || || 1/1/0001 12:00:00 AM || PRESENT || 229 || TARUN NANDA || || || 1/1/0001 12:00:00 AM || PRESENT || 228 || RAVI KUMAR || || || 1/1/0001 12:00:00 AM || PRESENT || 227 || RAJIV KUMAR || || || 1/1/0001 12:00:00 AM || PRESENT || 226 || PRASHANT KUMAR || || || 1/1/0001 12:00:00 AM || ABSENT || 225 || JYOTI NANDA || || || 1/1/0001 12:00:00 AM || PRESENT || can you help me where i am writing wrong code
  7. hello friend, I use these code for update my database with radio button checked or unchecked through array but my code could not update the server data please help me ::: my code is ::: <?php //include configuration file for connection include_once('config.php'); $sql = "select * from ATTENDANCE"; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <form name="form1" method="post" action="<? echo $_SERVER['REQUEST_URI']; ?>"> <table style="text-align: left; padding: 5px;" cellpadding="0px" cellspacing="0px"> <tbody> <tr> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student ID</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Name</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Present</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Student Absent</th> <th style="text-align: center; padding: 5px; border: 1px #000000 solid;">Comment</th> </tr> <?php while($rows=mysql_fetch_array($result)) { ?> <tr> <td class="table1"> <? $id[] = $rows['STUDENT_ID']; ?><? echo $rows['STUDENT_ID']; ?> </td> <td class="table1"> <? echo $rows['STUDENT_NAME']; ?> </td> <td id="present"> <input type="radio" name="present<? echo $rows['STUDENT_ID']; ?>" checked="checked" value="PRESENT">Present </td> <td id="absent"> <input type="radio" name="present<? echo $rows['STUDENT_ID']; ?>" value="ABSENT">Absent </td> <td style="text-align: left; padding: 5px; border: 1px #000000 solid; height: 33px;"> <? echo $rows['COMMENT']; ?> </td> </tr> <?php }?> <tr> <td colspan="5" style="vertical-align:middle; text-align: center;"><br><br> <input id="Submit" type="submit" name="Submit" value="Submit" style="text-align: center; background-color: #000000; color: #ffffff; border: 1px #000000 solid;"> </td> </tr> </tbody> </table> </form> <?php if($_POST['$Submit']) { foreach($_POST['STUDENT_ID'] as $id) { $sql = "UPDATE ATTENDANCE SET STUDENT_PRESENT = '".$_POST["present".$id]."' WHERE STUDENT_ID = '".$id."' "; $result = mysql_query($sql); } } if($result) { print_r ($_POST); header("location:report.php"); } else { echo "Your entry is not completed at this time............."; } ?>
  8. hello every body, I am trying to connect the oracle 10g with PHP code but my all code get error and does not get connection from the server database so i need the help from your site. can you help me My Code is:- <?php $db_host="xxx.xxx.xx.xxx"; // Host name $db_username="xxx"; // Mysql username $db_password="xxx"; // Mysql password $db_name="XE"; // Database name $tbl_name="USER_DETAIL"; // Table name // Connect to server and select database. try { $conn = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xx.xxx)(PORT = 1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVER_NAME=MYDB)))" ; $c= oci_connect($db_username, $db_password, $conn); $d=new PDO("oci:db_name=$conn",$db_username, $db_password); } catch(PDOException $e) { trigger_error("Could not connect to database",E_USER-ERROR); }
  9. Hello friends, I want to use this code for download the file from the server directory. <?php include_once('config.php'); // select record from mysql $sql="SELECT * FROM files ORDER BY id ASC"; $result=mysql_query($sql); ?><table width="490px" border="0" cellspacing="1" cellpadding="0" style="text-align: left"> <tr> <td style="height: 56px"><table width="490px" cellpadding="3" cellspacing="1" class="border" > <tr> <td colspan="3" class="border_id"><strong>Download File...</strong> </td> </tr> <tr> <td align="center" class="border_id" style="width: 49px; height: 13px"><strong>Id</strong></td> <td align="center" class="border_id" style="height: 13px"><strong>Name</strong></td> <td class="border_id"></td> </tr> <?php while($rows=mysql_fetch_array($result)){ ?><tr> <td class="border_id" style="width: 49px"><? echo $rows['id']; ?></td> <td class="border_name"><? echo $rows['name']; ?></td> <td class="border_id"><a href="upload/?id=<? echo $rows['id']; ?>">Download</a></td> </tr> <? // close while loop } // close connection; mysql_close(); ?></table></td> </tr> </table> But on the Download button i want to use the hyperlink with echo and directly download the file from server directory. but i not found the code. please help me. my all data store in "upload/" folder over the server. please correct this code <a href="upload/?id=<? echo $rows['id']; ?>">Download</a> Thanks
  10. Hello Friends, I use the parallels panel for server link, and in my website I use the PHP code over the HTML pages. So I just want to update the Apache Servers for ".HTM and .HTML file to server-parsed". This kind of work on cpanel easily done, but over the Parallels panel I never find the way to update the .HTML & HTM files. So please help me where I do the changes, so my problem get solved. Thanks Tarun Nanda
  11. Sir, I use all ready change the extension from HTML to PHP but its not working properly and those PHP file is giving blank over the browser. So as per your response can you tell me how (other methods to tell the server to parse other files as PHP files) in detail. Thanks Tarun nanda
  12. Hello Friends, I use the combination of the HTML and PHP. But if i use the PHP (ONLY CODE) separate file then its work. But if i use PHP code in HTML file it could not work properly and after run my html file PHP code will show over browser. this all work is doing over the server only. So, please help me what I do in this matter. and which type of changes I do it in HTML file or Server. Thanks Tarun Nanda
  13. Hello Friends, I am new in the PHP coding. So, I never know about the how to upload the video file in the server folder and also never know the code with related topic. So I requested to all PHP experts. Please give me the code of upload the video file to the server. so after use I upload the video file to my server. Thanks Tarun Nanda
×
×
  • 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.