Hey.. I need someone hwo can help me making my sql table..
I have no php skills. I have payed for a php program that shoud make dictation for people that have some problems reading danish.. with sound and text..
When I'm making the dictation with PHP I'm getting an error like this.: Query failed (SELECT word FROM repository): Table 'test_dig_dk.re pository' doesn't exist
the first one of the php, that I soud use for makeing the text is..
[PHP]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Nyt diktat</title>
<link href="style.css " rel="stylesheet " type="text/css" />
</head>
<body>
<h1 align="center"> Nyt diktat</h1>
<form class="standard " action="select_ audio.php?mode= create" method="post">
<p>
<label for="title">Tit el:</label>
<input type="text" name="title" id="title"<? if(isset($_POST['title'])) echo " value=\"".$_POS T['title']."\"";?> />
</p>
<p>
<label for="content">I ndhold:</label><br />
<textarea name="content" id="content" cols="100" rows="40"><? if(isset($_POST['title'])) echo implode("",file ("text/".$_POST['title'].".txt"));?> </textarea>
</p>
<p>
<input type="submit" value="Væ lg lyd" />
</p>
</form>
</body>
</html>
[/PHP]
And the 2'nd one is were I soud upload the au.file sound..
[PHP]<?
require("databa se.inc.php");
{connectDatabas e();}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Væ lg lyd til <?=$_POST['title']?></title>
<link href="style.css " rel="stylesheet " type="text/css" />
</head>
<body>
<? if(file_exists( "text/".$_POST['title'].".txt")) {
?>
<h1>Væl g lyd</h1>
<h3 style="color:#C C3333">Pas på! Der findes allerede et diktat med denne titel.<br />
Hvis du er ved at lave et nyt diktat, burde du gå <a href="javascrip t:history.back( )">tilbage</a> og vælge en anden titel.
Gør du ikke det, bliver diktatet med titelen "<?=$_P OST['title']?>" erstattet med dette diktat her!</h3>
<?
}
?>
<form enctype="multip art/form-data" action="save_di ct.php" method="post">
<input type="hidden" name="MAX_FILE_ SIZE" value="500000" />
<table border="0">
<?
$query = "SELECT word FROM repository";
$result = mysql_query($qu ery) or die("Query failed ($query): " . mysql_error());
$word_start=0;
$word_stop=0;
$open=false;
$words=array();
$content=$_POST['content'];
for($i=0;$i<str len($content);$ i++) {
if(substr($cont ent,$i,1)=="<" && !$open) {
$word_start=$i+ 1;
$open=true;
}
elseif(substr($ content,$i,1)== ">" && $open) {
$word_stop=$i;
$word=substr($c ontent,$word_st art,$word_stop-$word_start);
if(!in_array($w ord,$repository )) {
$words[]=$word;
?>
<tr>
<td><?=$word? ></td>
<td><input type="file" name="<?=$word? >" /></td>
</tr>
<?
}
$open=false;
}
}
?>
</table>
<input type="hidden" name="words" value="<? echo implode(";",$wo rds); ?>" />
<input type="hidden" name="content" value="<?=$_POS T['content']?>" />
<input type="hidden" name="title" value="<?=$_POS T['title']?>" />
<input type="submit" value="Upload & save" />
</form>
</body>
</html>
[/PHP]
I hope that you can see what the table is. and that you will help me creating it....
Thanks..
I have no php skills. I have payed for a php program that shoud make dictation for people that have some problems reading danish.. with sound and text..
When I'm making the dictation with PHP I'm getting an error like this.: Query failed (SELECT word FROM repository): Table 'test_dig_dk.re pository' doesn't exist
the first one of the php, that I soud use for makeing the text is..
[PHP]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Nyt diktat</title>
<link href="style.css " rel="stylesheet " type="text/css" />
</head>
<body>
<h1 align="center"> Nyt diktat</h1>
<form class="standard " action="select_ audio.php?mode= create" method="post">
<p>
<label for="title">Tit el:</label>
<input type="text" name="title" id="title"<? if(isset($_POST['title'])) echo " value=\"".$_POS T['title']."\"";?> />
</p>
<p>
<label for="content">I ndhold:</label><br />
<textarea name="content" id="content" cols="100" rows="40"><? if(isset($_POST['title'])) echo implode("",file ("text/".$_POST['title'].".txt"));?> </textarea>
</p>
<p>
<input type="submit" value="Væ lg lyd" />
</p>
</form>
</body>
</html>
[/PHP]
And the 2'nd one is were I soud upload the au.file sound..
[PHP]<?
require("databa se.inc.php");
{connectDatabas e();}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Væ lg lyd til <?=$_POST['title']?></title>
<link href="style.css " rel="stylesheet " type="text/css" />
</head>
<body>
<? if(file_exists( "text/".$_POST['title'].".txt")) {
?>
<h1>Væl g lyd</h1>
<h3 style="color:#C C3333">Pas på! Der findes allerede et diktat med denne titel.<br />
Hvis du er ved at lave et nyt diktat, burde du gå <a href="javascrip t:history.back( )">tilbage</a> og vælge en anden titel.
Gør du ikke det, bliver diktatet med titelen "<?=$_P OST['title']?>" erstattet med dette diktat her!</h3>
<?
}
?>
<form enctype="multip art/form-data" action="save_di ct.php" method="post">
<input type="hidden" name="MAX_FILE_ SIZE" value="500000" />
<table border="0">
<?
$query = "SELECT word FROM repository";
$result = mysql_query($qu ery) or die("Query failed ($query): " . mysql_error());
$word_start=0;
$word_stop=0;
$open=false;
$words=array();
$content=$_POST['content'];
for($i=0;$i<str len($content);$ i++) {
if(substr($cont ent,$i,1)=="<" && !$open) {
$word_start=$i+ 1;
$open=true;
}
elseif(substr($ content,$i,1)== ">" && $open) {
$word_stop=$i;
$word=substr($c ontent,$word_st art,$word_stop-$word_start);
if(!in_array($w ord,$repository )) {
$words[]=$word;
?>
<tr>
<td><?=$word? ></td>
<td><input type="file" name="<?=$word? >" /></td>
</tr>
<?
}
$open=false;
}
}
?>
</table>
<input type="hidden" name="words" value="<? echo implode(";",$wo rds); ?>" />
<input type="hidden" name="content" value="<?=$_POS T['content']?>" />
<input type="hidden" name="title" value="<?=$_POS T['title']?>" />
<input type="submit" value="Upload & save" />
</form>
</body>
</html>
[/PHP]
I hope that you can see what the table is. and that you will help me creating it....
Thanks..
Comment