[Xerte] Xerte and Php & MySQl

Lockley Patrick Patrick.Lockley at nottingham.ac.uk
Thu Apr 10 18:14:31 BST 2008


Hi all,
 
Just found an old xerte RLO i made to allow students to vote for their
favourite slide formatting.
 
http://www.nottingham.ac.uk/~cczpl/php.rlo
 
Have a look at ResultPage - then the untitled script at the top, and
then the slideload interaction at the bottom. I've had to change the url
in this RLO so as to make sure the proper page won't get damaged.
 
The php is effectively as such (it doesn't use mysql - stores the values
in files, but as Paul said, let the php do the work for you on that
part.
$string = $_GET['votes'];

$array = explode(",",$string);

echo "<scores>";

for($i=0;$i<=count($array)-1;$i++){

$filehandle = fopen($i+1,'r+');

$string = fread($filehandle,8000);

if($array[$i]==1){

$string+=1;

fseek($filehandle, 0);

fwrite($filehandle,$string);

}

echo "<vote>" . $string . "</vote>";

fclose($filehandle);

}

echo "</scores>";

It may be all academic now though!
 
Hope this helps
 
Pat



________________________________

	From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
	Sent: 10 April 2008 17:59
	To: Xerte discussion list
	Subject: RE: [Xerte] Xerte and Php & MySQl
	
	
	I have used it with PHP. I detailed my steps in this thread:
http://lists.nottingham.ac.uk/pipermail/xerte/2007-August/000039.html
	 
	It was just a test, but once I knew how to communicate with PHP,
I figure that's all I need from Xerte. I'll use PHP to do all the MySQL
stuff.
	 
	Paul


________________________________

		From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Scott Elliott
		Sent: Thursday, April 10, 2008 9:47 AM
		To: xerte at lists.nottingham.ac.uk
		Subject: [Xerte] Xerte and Php & MySQl
		
		
		I'm new to the list so not familiar with the recent
posts.
		
		Has anyone successfully used Xerte with Php and MySQL?
I want to be able to store data that trainees type in a text entry
frame.  I also want to read data from MySQL.  
		
		I'm a former Authorware user trying to find a suitable
program to fill the void.  I was able to use Authorware with php and
MySql. 
		
		Thanks in advance
		
		-- 
		Scott Elliott
		Instructional Developer
		Abbott Diagnostics Division
		Abbott Laboratories
		200 Abbott Park Rd.
		Abbott Park, IL 60064
		847-937-3928 (office)
		630-363-6771 (Cell)
		
		
		
		
		
		
		DISCLAIMER: This email and any files transmitted with it
may be privileged, confidential, is legally protected. This information
is intended only for the use of the individual or entity named above.
The authorized recipient of this information is prohibited from
disclosing this information to any other party unless permitted to do so
by law or regulation. If you are not the intended recipient, you are
hereby notified that any use, disclosure, copying, or distribution, is
strictly prohibited. If you have received this information in error,
please notify the sender immediately and arrange for the return or
destruction of these documents. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20080410/fd1a252e/attachment.html


More information about the Xerte mailing list