Hello Im trying to read from ttyUSB0 on Ubuntu using the following code: [CODE] <?php // Create the context set_time_limit(0); @ob_end_flush(); ob_implicit_flush(true); $c = stream_context_create(array('dio' => array('data_rate' => 1200, 'data_bits' => 7, 'stop_bits' => 2, 'parity' => 0, 'flow_control' => 0, 'is_blocking' => 0, 'canonical' => 1))); // You can change the properties above, matched with your device $handle = fopen("dio.serial:///dev/ttyUSB0", "r+", false, $c); //format: dio.serial://[device-name] if ($handle) { echo "Initiate port"; while(!feof($handle)) { $data = fgets($handle, 1024); // try to make long, so it will detect the newline automatically echo $data; sleep(1); } fclose($handle); } ?> [/CODE] It only …

Member Avatar
Member Avatar
+0 forum 2

Hi I am using Xampp Server in my machine, i used php mailer (class.phpmailer.php), when i run the mail file, i am getting the below error msg Could not execute: /var/qmail/bin/sendmail Please help me to solve this issue.

Member Avatar
Member Avatar
+0 forum 15

I am just trying to make a php edit script using a combo box or any other method. But I am not sure how to write a script when selecting a sportsid and fetch the related data at the same time. [CODE] $sql = "SELECT * FROM sports WHERE sport_id=2"; $query = mysql_query($sql); while ($row = mysql_fetch_array($query)){ $id = $row['sportid']; $sname = $row['sport_name']; $sprice = $row['sport_price']; } mysql_free_result($query); ?> <html> <head> <title>Edit User Info</title> </head> <body> <form action="updateinfo.php" method="post"> userid:<br/> <input type="text" value="<?php echo $id;?>" name="id" > <br/> Last Name:<br/> <input type="text" value="<?php echo $sname;?>" name="sname"/> <br/> Last Name:<br/> <input …

Member Avatar
Member Avatar
+0 forum 1

Hi Daniweb, I am confused, how to explode the numbers from database. Simply I can Explode, but after explode I have to relate the numbers to another table. If any one not clear abt my problem, pls reply Eg: 1, 2 Relate to Basket, football [CODE] $sql1=mysql_query("SELECT impid FROM customer where c_id=1") or die (mysql_error()); $result1 = mysql_fetch_array($sql1); echo $exp= $result1['impid']; // get 1, 2 from here echo $array=explode(",",$exp); // cannot get the output from explode function, How can I get the sports name from here. [/CODE]

Member Avatar
Member Avatar
-1 forum 2

Hi this is a great script in PHP which checks number of pages indexed by google, yahoo and bing. This is an clean API and no search engines will consider it as an automated queries. Though currently in PHP you can use this with any language. [url]http://www.host.co.in/forums/f52/check-number-pages-indexed-google-yahoo-indexed-bing-indexed-1744/[/url] It's great pleasure to share this script with all of you. Thanks

Member Avatar
+0 forum 0

I tried lot of way to pass the checkbox values from page 1 to page 2. But I only get successes on fruit id, how can pass the fruit charges. [CODE] // how can I pass room charges"$result[room_charges]" to page 2 // page 1 $sql=mysql_query("select * from fruit"); while ($result = mysql_fetch_assoc($sql)) { echo "<label> <input type=checkbox name=fruit[] value=$result[fruit_id] id=Test_0 > $result[fruit_name] | $$result[fruit_charges] </label> "; echo "<br>"; //page 2 // how to replace from page 1 $result[fruit_charges] the charges to f_pay // like room_id works $room=$_POST['room']; foreach ($fruit as $fruitname) { $sql="INSERT INTO reserve (f_aid, f_name, f_pay) VALUES ('$fid', …

Member Avatar
Member Avatar
+0 forum 7

I have created a login system based in PHP and MySQL, where upon registration, users enter the information required in the form. However, there is another page where they can review their information once they have logged in. I am new to PHP but I would like to know the code to show the user their OWN information and no other information from any other user. Thanks in advance...let me know if I have to be more clear.

Member Avatar
Member Avatar
+0 forum 7

I a table that I have added the function to be able to sort, it works, but it is coming up with an errors: Notice: Undefined index: sort in C:\wamp\www\test stuff\test.php on line 25 Notice: Undefined index: sort in C:\wamp\www\test stuff\test.php on line 28 Notice: Undefined index: sort in C:\wamp\www\test stuff\test.php on line 31 Notice: Undefined index: sort in C:\wamp\www\test stuff\test.php on line 34 Notice: Undefined index: sort in C:\wamp\www\test stuff\test.php on line 37 I am stumped, I have looked all over, but I can't figure out what the problem is. Any help would be apreciated. Thanks, ADM [CODE]<?php $con …

Member Avatar
Member Avatar
+0 forum 4

Hi, I need help. Im an new to this one. I have been into web designing for a long time. Just the designing part... I'm new to JavaScripts and PHP.. cant hey go together to create a web site that can work with the dynamics of both server sided and client sided scripting? Jeremiah

Member Avatar
Member Avatar
+0 forum 3

Hey y'all. I hope someone can shed some light on what I am needing to do. Just a little guidance should be good... What I have is an app where an employee slides their id badge and a form captures the long string of data from the magnetic strip on the back. I need to take the string that is read and convert it into two(2) separate variables. What I thought would be a simple task has got me beat.... Example of the full string: %B1500000000000015^EMPLOYEEID/SMITH John^031110100000019301000000877000000?;500000000000015=0305101193010877? First Variable from string: $StringVar1 = %B1500000000000015^EMPLOYEEID/SMITH John^031110100000019301000000877000000?; Second Variable from string: $StringVar2 …

Member Avatar
Member Avatar
+0 forum 5

greetings.. i'm newbie on php and mysql.. i need help on how to create search form that return the results related to it? i'm using php mysql.. thus, i need help on how to make each result that'll be as a link to all data in it's row.. thank you!

Member Avatar
Member Avatar
+0 forum 2

Hi guys, I'm trying to create a php script that'll send information gathered from a form and send it as an html email with the info arranged in tables. Can't seem to get it to work. Here's the message part of the script (containing the table): [CODE]$to="o.oloyede@feeslimited.net"; $message=" <table width="500" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC"> <tr> <td><table width="500" border="0" cellspacing="0" cellpadding="8"> <tr> <td colspan="2" bgcolor="#CDD9F5"><strong>APPLICATION FOR $course ?></strong></td> </tr> <tr> <td width="168" bgcolor="#FFFFEC"><strong>PROGRAM:</strong></td> <td width="290" bgcolor="#FFFFEC"><? $course ?></td> </tr> <tr> <td bgcolor="#FFFFDD"><strong>PERIOD:</strong></td> <td bgcolor="#FFFFDD"><? $month ?></td> </tr> <tr> <td bgcolor="#FFFFEC"><strong>NO OF PARTICIPANTS: </strong></td> <td bgcolor="#FFFFEC"><? $no_of_participants ?></td> </tr> <tr> <td bgcolor="#FFFFDD"><strong>APPLICANT …

Member Avatar
Member Avatar
+0 forum 3

The End.