pzuurveen 90 Posting Whiz in Training

Please post more code

be carefull what your asking, you might get it :-)
this will take some reading.....

pzuurveen 90 Posting Whiz in Training

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

pzuurveen 90 Posting Whiz in Training

check the value of
$request->getPost('remember')

pzuurveen 90 Posting Whiz in Training

You'r looking for
mysql-real-escape-string

pzuurveen 90 Posting Whiz in Training

I think you look for a custum Post type for use in a plugin

pzuurveen 90 Posting Whiz in Training

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

diafol commented: agreed +14
pzuurveen 90 Posting Whiz in Training

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++;
    }
pzuurveen 90 Posting Whiz in Training

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)

pzuurveen 90 Posting Whiz in Training
pzuurveen 90 Posting Whiz in Training

take a look at this:

$_SERVER

pzuurveen 90 Posting Whiz in Training

This site has demo's running so you can get a inpresssion about the functionality

pzuurveen 90 Posting Whiz in Training

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.

pzuurveen 90 Posting Whiz in Training

you can use your brouwser to download the xml maualy
or
for automatic download you need to write a server site script (php-curl)

pzuurveen 90 Posting Whiz in Training

/admin/offers.php could not be found on this server.

What's the question?

pzuurveen 90 Posting Whiz in Training

mysql_db_query is DEPRECATED
just use mysql_query

$shala = mysql_query($SQL);
pzuurveen 90 Posting Whiz in Training

the md5 function will do that (see link above)

pzuurveen 90 Posting Whiz in Training

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

pzuurveen 90 Posting Whiz in Training

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";
     ...
pzuurveen 90 Posting Whiz in Training

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");
		}
	}
?>
pzuurveen 90 Posting Whiz in Training

try

var_dump($_POST);

if they don't show up you got a problem with your form page

pzuurveen 90 Posting Whiz in Training

you can have 1 form with multiple submit buttons

pzuurveen 90 Posting Whiz in Training

i think it is:

mysql_query("SELECT a, b, (a+b) AS c FROM table HAVING c=1");
pritaeas commented: Correct. I keep forgetting HAVING +14
pzuurveen 90 Posting Whiz in Training

htmlentities does this for you

pzuurveen 90 Posting Whiz in Training

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']){
pzuurveen 90 Posting Whiz in Training

standard php function

substr-count

pzuurveen 90 Posting Whiz in Training

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

see php site

pzuurveen 90 Posting Whiz in Training

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

pzuurveen 90 Posting Whiz in Training

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

pzuurveen 90 Posting Whiz in Training

The width is part of the image tag

echo "<td><img width = '75' src='http://". $row['url'] . "' /></td>";
Kniggles commented: works a treet thanks +1