pzuurveen 90 Posting Whiz in Training

I suggest using
firebug's netpannel to trie and figure out the problem

pzuurveen 90 Posting Whiz in Training

just a thought:

do you have a 'headers already send' error
with you error messages turned off?

test by using by using a echo-statement at the start of your script

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

use

$r['harga']

and

$r['deskripsi']
pzuurveen 90 Posting Whiz in Training

the correct way is

$_SESSION['username']
pzuurveen 90 Posting Whiz in Training

check out htmlentities

pzuurveen 90 Posting Whiz in Training

Make sure that the fotolink points to the web and not to a local file

$fotolink="http://www.mysite.com/imagedir/foto.jpg";

		$uid = md5(uniqid(time()));
		// headers
		$emailHeaders="From: me@me.com \r\n";
		$emailHeaders.="Reply-To: me@me.com\r\n";
		$emailHeaders.= "MIME-Version: 1.0\r\n";
   		$emailHeaders.= "Content-Type: multipart/alternative; boundary=\"".$uid."\";\r\n\r\n";
		$EmailHeaders.= "\nMIME-Version: 1.0\n Content-Type: multipart/mixed;\n boundary=\"".$uid."\"";
   
		// message
		$emailMessage= "--".$uid."\r\n";
		$emailMessage.= "Content-Type: text/html; charset=\"iso-8859-1\"\n";
		$emailMessage.= "Content-Transfer-Encoding: base64\n\n";
		
		$html ='<html><body><table width="100%" border="2" cellspacing="2" cellpadding="2" style="border-style: double; border-bottom-width:medium;"><th colspan="2" style="font-size:large">Tiltle</th>';
		$html.="<tr><td>more</td><td>comments</td></tr>";
		
		$html.="<tr><td>Foto</td><td><img src=\"".$fotolink."\" /></td></tr></table></body></html>";
		$emailMessage.= chunk_split(base64_encode($html))."\r\n";
		$emailMessage.= "--".$uid."\r\n";
		$emailMessage.= "Content-Type: text/plain; charset=\"iso-8859-1\"\n";
		$emailMessage.= "Content-Transfer-Encoding: 7bit\n\n";
			
		$emailMessage.="if can't recive html mail get this massage "\n\n";
		
		$emailMessage.= "--".$uid."\r\n";		

						
		$Mailok =mail($Mail_emailadress,"foto for you", $emailMessage, $emailHeaders);
pzuurveen 90 Posting Whiz in Training

think you need to take the declaration of $cnt outside the if

if (!isset($_SESSION['cnt']) || !$_SESSION['cnt'])
            $_SESSION['cnt'] = '0';
 
$cnt = $_SESSION['cnt']; 
$cnt++;
$_SESSION['cnt'] = $cnt;

if (isset($_GET['actiune']) && ($_GET['actiune'] == "adauga"))
   {
   $_SESSION['nr_buc'][] = 1;
   $_SESSION['pret'][] = $_POST['pret'];
   $_SESSION['titlu'][] = $_POST['titlu'];
   $_SESSION['nume_autor'][] = $_POST['nume_autor'];
   }
pzuurveen 90 Posting Whiz in Training

does your script run in your rootdir: mywebsite or in a subdir : mywebsite/phpfiles/

pzuurveen 90 Posting Whiz in Training

If you can't send a picture inside the message as html.
You can only send it's URL
make sure the recverer does't get something like c:\local_user\my pictures\foto.jpg

pzuurveen 90 Posting Whiz in Training

That would be true if you used include or require ,
but you use an javascript function to load it seperetly.

pzuurveen 90 Posting Whiz in Training

$cnt is set inside an if-statment:

if (isset($_GET['actiune']) && ($_GET['actiune'] == "adauga"))
             {

so if this is false $cnt don't exist

pzuurveen 90 Posting Whiz in Training

Where do $message_id and $username get there value ?
if not in db_connect.php then they don't exist

pzuurveen 90 Posting Whiz in Training

use

$query="Select UserId, UserName, Password FROM user_login Where UserName= '".$_POST['username']."' and Password= '".$_POST['password']."'";
echo $query;
$sql=mysql_query($query) or die(mysql_error());

at least you get some more info

pzuurveen 90 Posting Whiz in Training

what are u try to do with

<?=$row['song']?>

if u wan to display $row

<? echo $row['song']; ?>

your code will look like

<form id="adminsform" name="adminsform" method="post" action="">
<input type="checkbox" name="master" onClick="checkedAll('adminsform')" value=""/>
<?php 
while($row=mysql_fetch_array($result))
	{  ?>
   <input type="checkbox" name="musicid[]" value="<?php echo $row['id']; ?>" />
   <?php echo $row['song']." ".$row['singername']." ".$row['songtype']; ?>
 
   <td width="15%"><?=$row['songtypeav']; ?></td>
   <?php 
   if($row['songtypeav']=="Audio Song") 
   			{ ?>
            <a href="sec.php?id=<?php echo $row['id']; ?>&act=play">Play</a>
            &nbsp
            <a href="edit.php?id=<?php echo $row['id']; ?>">Edit</a>
      <?php } 
   if($row['songtypeav']=="Video Song") 
   			{ ?>
           <a href="vidsong.php?id=<?php echo $row['id']; ?>">Play</a>
           &nbsp
           <a href="edit.php?id=<?php echo $row['id']; ?>">Edit</a>
      <?php } 
	                
   if(isset($_REQUEST['ac']))
		{
   		foreach($_REQUEST['musicid'] as $ids) 
 			{
 			$mdquery="DELETE FROM members WHERE id='$ids'";
 			mysql_query($mdquery);
 			//header('Location:sec.php');
 			}
 		}
	}?>
</form>
pzuurveen 90 Posting Whiz in Training

on this site you can try them out yourself:

http://php.opensourcecms.com/

pzuurveen 90 Posting Whiz in Training

The variables that make up your VAULE part don't exits at this point in the script.
You create them later in the block

if (isset( $_POST['payrec']) )
      {
      $pd=$_POST['pd'];
      $payrec=$_POST['payrec'];
       ...
      }

so move this blok to the top of your script

pzuurveen 90 Posting Whiz in Training

sorry i forget the second )

if (is_set($_SESSION['username'])) {
       $username = $_SESSION['username'];
       }

that's better

pzuurveen 90 Posting Whiz in Training

@brants

It's the same problem
$_SESSION and $_SESSION don't exist jet

if (is_set($_SESSION['username']){
       $username = $_SESSION['username'];
       }

do the same with userid


on second thought:
do you realy need session for your styling?

pzuurveen 90 Posting Whiz in Training

cookies need to be send before any other output

check for white space Before <?php tag

also could try

if(isset($_COOKIE['logedin']))
   {
   header("Location: http://www.example.com/");
   }
else

cant test myself now so no guarantees

pzuurveen 90 Posting Whiz in Training

You never close this block

if (isset( $_POST['payrec']) ) 
          {
pzuurveen 90 Posting Whiz in Training

take your declaration of function number_of_days
outside your while loop
best is top of the script

pzuurveen 90 Posting Whiz in Training

Or if you gone use that var more: do

$edit_mileage= $_GET['edit_mileage']
pzuurveen 90 Posting Whiz in Training

That is not advissed.

In PHP 5.3.0 that has been DEPRECATED e.a it doesn't work anymore

pzuurveen 90 Posting Whiz in Training

If i understand corectly:
You have something like a form (no listing) that sends data to a page (listing 1)
that sends the data to /i-cmsys/editableinvoice/index.php (listing 2)


if so:
Data send in th url is GET data
use

echo $_GET['edit_mileage'];
pzuurveen 90 Posting Whiz in Training

at line 6

Row['path']

still doesn't exist
you create it at line 11

#while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){

when php has an error like that u often get a blank screen
to show errors: start your script with

error_reporting(E_ALL);
pzuurveen 90 Posting Whiz in Training

why use 2 tabels?
isn't it easier to use only one?

pzuurveen 90 Posting Whiz in Training

In your first script
where is the array

$row['path'];

(line 6)

come from?

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

i see 3 solutions

1 fopen each file and readout the <title> atrebute
-This probley makes your script to slow to be use full

2 put the tilte and the filenames in an array and
- if you want to add a new file u also have to edit your script

3 rename your files ea page1.php --> members.php than echo the filename without .php

pzuurveen 90 Posting Whiz in Training

You use

mysql_free_result($result)

as part of your loop

so the second time in the while loop $result is empty

pzuurveen 90 Posting Whiz in Training

standard php function

substr-count

pzuurveen 90 Posting Whiz in Training

just start,
if you have problems just google or 'daniweb'

pzuurveen 90 Posting Whiz in Training

not sure wat you want but i gess

just build the sub radio buttons use display:none

then create an actionscript to set display:block

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

did you do

var_dump($_POST);

to check what you got back?
if not checked a checkbox will give a $_POST var.

check if it exist

if(isset($_POST['Proof']))

furthere more before puting $_post in a db ALWAYS use
mysql_real_escape_string() to prevend hacking
this gives

if(isset($_POST['Proof'])) {
  $Proof = mysql_real_escape_string($_POST['Proof']) 
  }
pzuurveen 90 Posting Whiz in Training

you must use

$_POST['lastname']

not

$_POST[lastname]

sorry i didn't seed that

pzuurveen 90 Posting Whiz in Training

the code i posed shoud work
(didn't test)

pzuurveen 90 Posting Whiz in Training

refering to array's in a string doesn't work

sql= "bla $_POST[lastname] bla";

wrong (bla bla)

sql= "$lastname"

ok

sql= "bla ".$_POST[lastname]."bla";

also ok

pzuurveen 90 Posting Whiz in Training

put the emails in a database?

pzuurveen 90 Posting Whiz in Training

ALLWAYS use mysql_real_escape_string()
or you will be hacked read http://www.php.net/manual/en/security.database.sql-injection.php

mysql_select_db("mlsconnection_99k_dbusers", $con);

$sql="INSERT INTO Persons (FirstName, LastName, Email, Password)
VALUES
(".mysql_real_escape_string($_POST[firstname])."','".mysql_real_escape_string($_POST[lastname])."','".mysql_real_escape_string($_POST[Email])."','".mysql_real_escape_string($_POST[Password])."')";

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo "User created, Thanks for Registrating";

mysql_close($con)
pzuurveen 90 Posting Whiz in Training

use $_session

pzuurveen 90 Posting Whiz in Training

using

session_id()

will create a cooky

some pc might have cooky's disabeled.

p.s please use the code tages for readebilty

pzuurveen 90 Posting Whiz in Training

i recenty had a simular probem
see
http://www.daniweb.com/forums/thread328163.html

pzuurveen 90 Posting Whiz in Training

from your err msg
file name= /www/parctice/test/htdocs/Misa Campo073.jpg linux will read this as call to /www/parctice/test/htdocs/Misa passing a parameter Campo073.jpg

pzuurveen 90 Posting Whiz in Training

I 'm always suspicious about filenames with spaces

$fileName=str_replace(" ","_",$fileName);
pzuurveen 90 Posting Whiz in Training

robots.txt usaly is not protected
just use www.thesite.com/robots.txtin your brouwser

pzuurveen 90 Posting Whiz in Training

Youre query doesn't give a good result
use at line 12

$query2 = mysql_query($sql2) or die(mysql_error());

to get more details

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