Hallo,
ich arbeite grad an einem Projekt für einen Krankenhaus in Spanien. Das Skript soll die Daten auf DB senden, Aber irgendwie gehts nicht und bringt auch keine Fehlermeldungen.. Ich ein php newbie und bräuchte bitte dringend Hilfe ..
ich arbeite grad an einem Projekt für einen Krankenhaus in Spanien. Das Skript soll die Daten auf DB senden, Aber irgendwie gehts nicht und bringt auch keine Fehlermeldungen.. Ich ein php newbie und bräuchte bitte dringend Hilfe ..
PHP-Code:
<?php error_reporting(E_ALL); // alle Fehler anzeigen?>
<html>
<head>
<title>Eintrag hinzufügen</title>
</head>
<body>
<?php
$DatabasePointer = mysql_connect("localhost", "root", "");
mysql_select_db("test2", $DatabasePointer);
$SQL = "INSERT INTO patientdata (ID,Date,Age,************,Height,Weight,Neckdiameter,Morphology,Diagnostic,Authors,
Comments,protocol,protocolbegintime,protocolendtime,datarecordprotocol,datarecstart1,datarecstart2,eeg1,eeg2,eog1,
eog2,emg1,emg2,ecg,libre,trach,flow,spo2,effort1,effort2,
bodyp,locationmic,sandsmic,sensmic,gainmic,locationacele,sandsacele,sensacele,gainacele,otros,
locationotros,sandsotros,sensotros,gainotros,recordbegin,right,back,left,recordend,wakelatency,
wakeduration,waketib,wakesleeptime,stageremlatency,stageremduration,stageremtib,stageremsleeptime,stage1latency,stage1duration,stage1tib,
stage1sleeptime,stage2latency,stage2duration,stage2tib,stage2sleeptime,stage3latency,stage3duration,stage3tib,stage3sleeptime,stage4latency,
stage4duration,stage4tib,stage4sleeptime,artifactlatency,artifactduration,artifacttib,artifactsleeptime,indetlatency,indetduration,indettib,
indetsleeptime,recordingstarttime,recordingendtime,analysisstarttime,analysisendtime,nrepochs,epochsize,totalrecordingtime,totalsleeptime,nrawakenings,
totalwaketime,sleepefficiency,sleepmaintenance,sleeponsetlatency,stageremlatencymin,waketimesleeponset,rem1starttime,rem1endtime,rem1density,rem2starttime,
rem2endtime,rem2density,rem3starttime,rem3endtime,rem3density,rem4starttime,rem4endtime,rem4density,desaturationreq,nrdesaturation,
desaturationindex,basalsleep,averageo2,longestdesaturation,nrdesaturations90,nrdesaturations88,averageduration90,averageduration88,averagedesaturation90,averagedesaturation88,
min02value,nrdesaturationwake,recordingartifact,nrpossibledesaturation,timespentbelow4,timespentbelow10,basalratesleep,slowestheartrate,fastestheartrate,nrbradycardic,
longestbradycardia,lowestratebrady,averagebradyduration,averagelowbrad,nrtachycardic,longesttachycardia,highestratetach,averagetachduration,averagehighduration,nrwakebradtach,
bradytachindex,nrpossiblebrady,nrpossibletachy,pcrecordingart,truesnoringevents,mintime,maxtime,meantime,truesnoringhours,pctimesnoring,
possiblesnoringevents,possiblesnoringhours,pctimepossnoring,truepossnoringevents,truepossnoringhours,pctimetruepossnoring,othercomments,datarecend1,datarecend2)
VALUES ('".$_REQUEST['ID']."',NOW('')), '".$_REQUEST['Age']."', '".$_REQUEST['************']."', '".$_REQUEST['Height']."', '".$_REQUEST['Weight']."', '".$_REQUEST['Neckdiameter']."', '".$_REQUEST['Morphology']."', '".$_REQUEST['Diagnostic']."', '".$_REQUEST['Authors']."',
'".$_REQUEST['Comments']."', '".$_REQUEST['protocol']."', '".$_REQUEST['protocolbegintime']."', '".$_REQUEST['protocolendtime']."', '".$_REQUEST['datarecordprotocol']."', '".$_REQUEST['datarecstart1']."', '".$_REQUEST['datarecstart2']."', '".$_REQUEST['eeg1']."', '".$_REQUEST['eeg2']."', '".$_REQUEST['eog1']."',
'".$_REQUEST['eog2']."', '".$_REQUEST['emg1']."', '".$_REQUEST['emg2']."', '".$_REQUEST['ecg']."', '".$_REQUEST['libre']."', '".$_REQUEST['trach']."', '".$_REQUEST['flow']."', '".$_REQUEST['spo2']."', '".$_REQUEST['effort1']."', '".$_REQUEST['effort2']."',
'".$_REQUEST['bodyp']."', '".$_REQUEST['locationmic']."', '".$_REQUEST['sandsmic']."', '".$_REQUEST['sensmic']."', '".$_REQUEST['gainmic']."', '".$_REQUEST['locationacele']."', '".$_REQUEST['sandsacele']."', '".$_REQUEST['sensacele']."', '".$_REQUEST['gainacele']."', '".$_REQUEST['otros']."',
'".$_REQUEST['locationotros']."', '".$_REQUEST['sandsotros']."', '".$_REQUEST['sensotros']."', '".$_REQUEST['gainotros']."', '".$_REQUEST['recordbegin']."', '".$_REQUEST['right']."', '".$_REQUEST['back']."', '".$_REQUEST['left']."', '".$_REQUEST['recordend']."', '".$_REQUEST['wakelatency']."',
'".$_REQUEST['wakeduration']."', '".$_REQUEST['waketib']."', '".$_REQUEST['wakesleeptime']."', '".$_REQUEST['stageremlatency']."', '".$_REQUEST['stageremduration']."', '".$_REQUEST['stageremtib']."', '".$_REQUEST['stageremsleeptime']."', '".$_REQUEST['stage1latency']."', '".$_REQUEST['stage1duration']."', '".$_REQUEST['stage1tib']."',
'".$_REQUEST['stage1sleeptime']."', '".$_REQUEST['stage2latency']."', '".$_REQUEST['stage2duration']."', '".$_REQUEST['stage2tib']."', '".$_REQUEST['stage2sleeptime']."', '".$_REQUEST['stage3latency']."', '".$_REQUEST['stage3duration']."', '".$_REQUEST['stage3tib']."', '".$_REQUEST['stage3sleeptime']."', '".$_REQUEST['stage4latency']."',
'".$_REQUEST['stage4duration']."', '".$_REQUEST['stage4tib']."', '".$_REQUEST['stage4sleeptime']."', '".$_REQUEST['artifactlatency']."', '".$_REQUEST['artifactduration']."', '".$_REQUEST['artifacttib']."', '".$_REQUEST['artifactsleeptime']."', '".$_REQUEST['indetlatency']."', '".$_REQUEST['indetduration']."', '".$_REQUEST['indettib']."',
'".$_REQUEST['indetsleeptime']."', '".$_REQUEST['recordingstarttime']."', '".$_REQUEST['recordingendtime']."', '".$_REQUEST['analysisstarttime']."', '".$_REQUEST['analysisendtime']."', '".$_REQUEST['nrepochs']."', '".$_REQUEST['epochsize']."', '".$_REQUEST['totalrecordingtime']."', '".$_REQUEST['totalsleeptime']."', '".$_REQUEST['nrawakenings']."',
'".$_REQUEST['totalwaketime']."', '".$_REQUEST['sleepefficiency']."', '".$_REQUEST['sleepmaintenance']."', '".$_REQUEST['sleeponsetlatency']."', '".$_REQUEST['stageremlatencymin']."', '".$_REQUEST['waketimesleeponset']."', '".$_REQUEST['rem1starttime']."', '".$_REQUEST['rem1endtime']."', '".$_REQUEST['rem1density']."', '".$_REQUEST['Authors']."',
'".$_REQUEST['rem2endtime']."', '".$_REQUEST['rem2density']."', '".$_REQUEST['rem3starttime']."', '".$_REQUEST['rem3endtime']."', '".$_REQUEST['rem3density']."', '".$_REQUEST['rem4starttime']."', '".$_REQUEST['rem4endtime']."', '".$_REQUEST['rem4density']."', '".$_REQUEST['desaturationreq']."', '".$_REQUEST['rem2starttime']."',
'".$_REQUEST['desaturationindex']."', '".$_REQUEST['basalsleep']."', '".$_REQUEST['averageo2']."', '".$_REQUEST['longestdesaturation']."', '".$_REQUEST['nrdesaturations90']."', '".$_REQUEST['nrdesaturations88']."', '".$_REQUEST['averageduration90']."', '".$_REQUEST['averageduration88']."', '".$_REQUEST['averagedesaturation90']."', '".$_REQUEST['averagedesaturation88']."',
'".$_REQUEST['min02value']."', '".$_REQUEST['nrdesaturationwake']."', '".$_REQUEST['recordingartifact']."', '".$_REQUEST['nrpossibledesaturation']."', '".$_REQUEST['timespentbelow4']."', '".$_REQUEST['timespentbelow10']."', '".$_REQUEST['basalratesleep']."', '".$_REQUEST['slowestheartrate']."', '".$_REQUEST['fastestheartrate']."', '".$_REQUEST['nrbradycardic']."',
'".$_REQUEST['longestbradycardia']."', '".$_REQUEST['lowestratebrady']."', '".$_REQUEST['averagebradyduration']."', '".$_REQUEST['averagelowbrad']."', '".$_REQUEST['nrtachycardic']."', '".$_REQUEST['longesttachycardia']."', '".$_REQUEST['highestratetach']."', '".$_REQUEST['averagetachduration']."', '".$_REQUEST['averagehighduration']."', '".$_REQUEST['nrwakebradtach']."',
'".$_REQUEST['bradytachindex']."', '".$_REQUEST['nrpossiblebrady']."', '".$_REQUEST['nrpossibletachy']."', '".$_REQUEST['pcrecordingart']."', '".$_REQUEST['truesnoringevents']."', '".$_REQUEST['mintime']."', '".$_REQUEST['maxtime']."', '".$_REQUEST['meantime']."', '".$_REQUEST['truesnoringhours']."', '".$_REQUEST['pctimesnoring']."',
'".$_REQUEST['possiblesnoringevents']."', '".$_REQUEST['possiblesnoringhours']."', '".$_REQUEST['pctimepossnoring']."', '".$_REQUEST['truepossnoringevents']."', '".$_REQUEST['truepossnoringhours']."', '".$_REQUEST['pctimetruepossnoring']."', '".$_REQUEST['othercomments']."', '".$_REQUEST['datarecend1']."', '".$_REQUEST['Diagnostic']."', '".$_REQUEST['datarecend2']."'";
mysql_query($SQL, $DatabasePointer);
$error = mysql_affected_rows($DatabasePointer);
if(mysql_affected_rows($DatabasePointer) == 1)
{
?>
<p>Vielen Dank für Ihren Eintrag!<br>
<a href="patient_data.php">Zurück</a></p>
<?php
}
else
{
?>
<p>Beim Eintragen ist ein Fehler aufgetreten.<br>
<a href="javascript:history.back();">Zurück</a>
</p>
<?php
}
?>
</body>
</html>
Kommentar