Please post more code
be carefull what your asking, you might get it :-)
this will take some reading.....
Please post more code
be carefull what your asking, you might get it :-)
this will take some reading.....
contact your server provider
You server is configured to save cookys to /var/chroot/home/content/96/9375396/tmp/
But that diretory appears not to exist
check the value of$request->getPost('remember')
your $_POST variables don't exist until after you submit your form
You can use isset($_POST['submit'])
to check if your form has been submited
also take a look at mysql_real_escape_string
If you don't have a variable like $v['id'] or $v['idnr'] you cal alway count the questions yourself
$questionNr=0;
foreach($qas as $k=>$v)
{
echo "<input id='question$questionNr' style='width:40%' type='text'
value='".$v['question']."' name='questions[]' >";
echo '<br /><br />';
foreach($v['answers'] as $answer)
{
echo "<input type=\"radio\" name=\"selected_answers$questionNr\" value='\".$answer.\"' />";
echo "$answer";
echo "<br/>";
}
$questionNr++;
}
You should change the name of radiobutten for each questing
something like:
echo "<input type=\"radio\" name=\"selected_answers".$v['idnr']."\" value='\".$answer.\"' />";
$v['question'] probably has spaces, so don't use that.
do something simular for the id of the input statement, id supposed to be unique. (line 3)
checkout imagecopyresampled , look at example 1.
Do you want to add the images to to the database?
It's often better (faster) to save the image to a special dir and just store the filname in the database.
you can use your brouwser to download the xml maualy
or
for automatic download you need to write a server site script (php-curl)
/admin/offers.php could not be found on this server.
What's the question?
mysql_db_query is DEPRECATED
just use mysql_query
$shala = mysql_query($SQL);
the md5 function will do that (see link above)
In your admin/securepage.php you just check for a username in $_SESSION
both your login.php create a $_SESSION
in your admin/login.php create a $_SESSION and check for that in the adminpages.
Better: have one login.php do both checkes
better: combine your user and admin-tables and add an admin-field
You might creat a link like
echo "<a href='http://www.yoursite.com/playsong.php?songid=".$rows['song_id']."'>" .$rows['song_name'].'</a>';
then in playsong.php
query your db again for the url
if (isset($_GET['songid'] )
{
$songid=mysql_real_escape_string($_GET['songid']);
$query="SELECT song_url FROM songs WHERE song_id=$songid";
...
You had an exstra ) on line 3
long live 'TAB'
<?php
$res = mysql_query("SELECT * FROM users WHERE username = '$user' LIMIT 1");
if(mysql_num_rows($res)>0)
{
$d = mysql_fetch_array($res);
if($pass == $d['password'])
{
session_regenerate_id(); //security for changing permissions
$_SESSION['user_id'] = $d['user_id'];
$_SESSION['usertype_id'] = $d['usertype_id'];
switch($d['usertype_id'])
{
case 1:
$loc = "nurse.php";
break;
case 2:
$loc = "paramedic.php";
break;
case 3:
$loc = "doctor.php";
break;
case 4:
$loc = "medprac.php";
break;
case 5:
$loc = "wardboss.php";
break;
case 6:
$loc = "consultant.php";
break;
}
header("Location: $loc");
}
}
?>
try
var_dump($_POST);
if they don't show up you got a problem with your form page
you can have 1 form with multiple submit buttons
i think it is:
mysql_query("SELECT a, b, (a+b) AS c FROM table HAVING c=1");
htmlentities does this for you
You get that error because you call
$_POST['savebtn']
without having $_POST
it doesn't exist until after the form is submited
you have to check first.
chanche your if statement to
if( isset($_POST['savebtn']) && $_POST['savebtn']){
In your form
use
<input type="hidden" name="MAX_FILE_SIZE" value="102400" />
<input type="file" .......
this pervents uploads of bigger files on the client side
still need to check the size at the server side
Just make sure there is no output be for your header call
(not even a white line outside your php tags)
You can rearrange your code
<!-- no white lines here -->
<?php
if ($_GET['goto']=='register'){
?>
<form name='register' method='POST' action='?goto=reg'>
<table style='margin-left: auto; margin-right: auto; color: white; font-weight: bold;'>
<tr><td style='text-align:center;'>First Name: <input type='text' name='first'></td></tr>
<tr><td style='text-align:center;'>Last Name: <input type='text' name='last'></td></tr>
<tr><td style='text-align:center;'>Email: <input type='text' name='email'></td></tr>
<tr><td style='text-align:center;'>Password: <input type='text' name='pass'></td></tr>
<tr><td style='text-align:center;'><INPUT TYPE='SUBMIT' value='Register' name='submit' id='submit'></td></tr>
</table>
</form>
<?php
}
else if($_GET['goto']=='reg'){
include "dbconnect.php";
$fname=$_POST['first'];
$lname=$_POST['last'];
$email=$_POST['email'];
$email=mysql_real_escape_string($email);
$password=$_POST['pass'];
$password=md5($password);
$date=date("y-m-d");
$query="INSERT INTO members (name, lname, email, password, date) VALUES ('$fname','$lname','$email','$password','$date')";
$result=mysql_query($query);
if ($result){
header("location:?goto=thankyou");
}else{
echo"<font color='white'>nope</font>";
}
else {
?> <a href='?goto=register'>register</a>
<?php
}
}
?>
hope it helps
are your comment text?
The u can't store them in a longint. Just use TEXT as ur column type
If there are numerical i don't see the problem with new lines