Jump to content

$row


user4fun

Recommended Posts

<?  $result = mysql_query("SELECT `subweb` FROM `websites` WHERE `username` = '" . strtolower($_POST['username']) ."' "); echo $type1;  /entry from previouse form, same for type2 and type 3echo "<br>";echo $type2;echo "<br>";echo $type3;echo "<br>";echo "<table border='1'><tr><th>Heading1</th><th>Heading2</th><th>Heading3</th></tr>";while($row = mysql_fetch_array($result))  {  echo "<tr>";  echo "<td>" . $row['subweb'] . "</td>";//this is where i need to do stuff with the output before moving on to the next row$replacer = 'www.';$destination = str_replace("$replacer", "$type1", ". $row['subweb'] ."); //I think this is wrong  echo "<td>" ."$destination". "</td>";include ("finish.php);  echo "</tr>";  }echo "</table>";?>

When a row appearsthen do the str_replace then include or if better run file finish.phpthen move on to the next record.I beg you to help, iam going crazy

Link to comment
Share on other sites

If you want what ever content in "finish.php" at every rowthen you can go with following..

<?phpwhile($row = mysql_fetch_array($result))  {  	  $replacer = 'www.';	  $destination = str_replace($replacer, $type1,$row['subweb']);   	  echo "<tr>";      echo "<td>" . $row['subweb'] . "</td>";	  echo "<td>" ."$destination". "</td>";      include ("finish.php");	  echo "</tr>";  }echo "</table>";?>

Regards,Vijay

Link to comment
Share on other sites

It works great.Just for my own knowledge if it does come up.How to i add another column at the begining that would start of at 1 then the next row would be ++so the results would end up being numberedTHANK YOU again for the fix

Link to comment
Share on other sites

Does "echo $row['subweb'];" not work?
unfortunatly notthe finsih.php file is a fie that sends an email message using the following format$to = $destination; $from = " "; $title = " ";$body = <<< emailbody Some textthis is where i want the row[subweb] to appearemailbody; $success = mail($to,$from,$title,$body, "From:$from\r\nReply-To:");?>
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...