Jump to content

Chetan

Members
  • Posts

    162
  • Joined

  • Last visited

    Never

Everything posted by Chetan

  1. then dun use vars like $_SERVER[SCRIPT_FILENAME] use the name like in this case index.php?p=name2 [/3]
  2. [code] mail($to, $subject, $message, "From: me<terry654321@hotmail.co.uk>\nX-Mailer: PHP/") or die("Unable to send mail"); [/code] thats not error handling [code] if(mail($to, $subject, $message, "From: me<terry654321@hotmail.co.uk>\nX-Mailer: PHP/") or die("Unable to send mail")) { echo "postd"; } else { echo "no post"; } [/code] this should tell you the truth and put ini_set("display_errors", "1"); in the starting, befor anything.
  3. u see its not easy. you can ofcourse write to a simple text file and include it in a php page, like what one does in chat pags. the stuff is savd in a file which is shown in a stylish way. edit another way __________ Simple create a php page which includes vars from another php page and evals and displays them displays them, and you write to the pag with vars for eg the first time you write to the page it looks like [code] <?php $body="helo"; ?> [/code] second time [code] <?php $body="helo"; $body"$body world"; ?> [/code] and the pag which displays this would hav somehing like put fread stuff in this scriipt [code] <?php include($page); // the above page echo $body; ?> [/code] and th pag which writes uses fwrite like this [code] $txt = "new" fwrite($file, "<?php \n \$body=\"\$body $txt\"; \n ?>"); [/code]
  4. if i get the code better and i think its not with php
  5. u mean the one which dos not show at all?
  6. Simple create a php page which includes vars from another php page and evals and displays them displays them, and you write to the pag with vars for eg the first time you write to the page it looks like [code] $body="helo"; [/code] second time [code] $body="helo"; $body"$body world"; [/code] and the pag which displays this would hav somehing like put fread stuff in this scriipt [code] <?php eval($code); echo $body; ?> [/code] and th pag which writes uses fwrite like this [code] $txt = "new" fwrite($file, "\$body=\"\$body $txt\";"); [/code] it is a bit complicated but i would hav used this if i had to
  7. [quote author=king arthur link=topic=101819.msg407145#msg407145 date=1154429140] I can't see anything wrong, but if it is printing from this line [code]                         $statement = "UPDATE sessions SET expiry = $expiry, value = '$value' " .                                "WHERE sesskey = '$key' AND expiry > " . time(); [/code] why not try putting that code all on one line, without the concatenation before the "WHERE", as you do not really need to have it split over two lines. I can't see why that would be a problem but if that's where it starts going wrong then it's worth playing around with it to see what happens. [/quote] Me agree but do this too dont use . to join again, cause u can just use time() in side "" [code]                         $statement = "UPDATE sessions SET expiry = $expiry, value = '$value' WHERE sesskey = '$key' AND expiry >  time()"; [/code]
  8. u meen to say that if EstatTecnic is different from A then the row should not be displayed? the here is wat 2 do [code] while ($row_rstTecnic = mysql_fetch_assoc($rstTecnic)){   echo '<tr><td>'.$row_rstTecnic['NomTecnic'].'</td>';   if($row_rstTecnic['EstatTecnic']=="A"){       echo '<td><a href="tecnic.php?tecnic='.$row_rstTecnic['NumTecnic'].'" title="View details for '.$row_rstTecnic['NomTecnic'].'">see</a></td></tr>';   }   else {       echo '<td>&nbsp;</td></tr>';   } } [/code] to [code] while ($row_rstTecnic = mysql_fetch_assoc($rstTecnic)){   if($row_rstTecnic['EstatTecnic']=="A"){       echo '<tr><td>'.$row_rstTecnic['NomTecnic'].'</td>';       echo '<td><a href="tecnic.php?tecnic='.$row_rstTecnic['NumTecnic'].'" title="View details for '.$row_rstTecnic['NomTecnic'].'">see</a></td></tr>';   }   else {       echo '<td>&nbsp;</td></tr>';   } } [/code] or this incase you dont want to display names at all [code] while ($row_rstTecnic = mysql_fetch_assoc($rstTecnic)){   if($row_rstTecnic['EstatTecnic']=="A"){       echo '<td><a href="tecnic.php?tecnic='.$row_rstTecnic['NumTecnic'].'" title="View details for '.$row_rstTecnic['NomTecnic'].'">see</a></td></tr>';   }   else {       echo '<td>&nbsp;</td></tr>';   } } [/code]
  9. then you use <?PHP and ?> around your code, then i dont think there is a problem. eval is not likely he case cause i dont think you rad this script and then execute it and its not time() you see cause you are using it the right way
  10. This would work perfectly I get wat you mean [code] elseif ($_GET['p'] == "name_all") { include("$_SERVER[SCRIPT_FILENAME]?p=name2"); include("$_SERVER[SCRIPT_FILENAME]?p=name3"); } [/code] See its simple if you use get to get the content you can include the same script with different get parameters. :) hope dat helps
  11. I thik its a php mistake cause all the extra it displays is in PHP and not HTML [code] <table align="center"width="400" border="4" cellpadding="2" cellspacing="0" bordercolor="#FF3300" bgcolor="#FF6600" summary="Un Listado de todos los Tecnicos almacenados en la base de datos">      <caption align="center" class="TEXTO2">      Técnicos Base de Datos      </caption> <table> <?php while ($row_rstTecnic = mysql_fetch_assoc($rstTecnic)){   echo ('<tr>              <td>'. $row_rstTecnic['NomTecnic'] .'</td>');   if($row_rstTecnic['EstatTecnic']=="A"){       echo ('<td><a href="tecnic.php?tecnic='. $row_rstTecnic['NumTecnic'] .'" title="View details for '. $row_rstTecnic['NomTecnic'] .'">see</a></td>');   }else{       echo '</td>&nbsp;<td>';   }   echo '</tr>'; } ?> </table> [/code]
  12. There is a chance he might have a script above this, dun u think but ther is no sarting for the TD in the beginning of the while, check that and this is a php place where he made the mistake not html [code] <? while ($row_rstTecnic = mysql_fetch_assoc($rstTecnic)){ if($row_rstTecnic['EstatTecnic']=="A"){ echo $row_rstTecnic['NomTecnic']."</td><td><a href=\"tecnic.php?tecnic=".$row_rstTecnic['NumTecnic']."\">see</a></td>"; }else{ echo "</td><td></td>"; } echo "</tr>"; } ?> </table> [/code] *bumped*
  13. Can you be more specific I dont understand what you mean to say
  14. my daddy used to work fer pepsi so u see i hav 2 support pepsi
  15. Because setcookie changes the headers and you cant change headers after giving the content, so you need to set the cookie before you put any content
  16. I told you to remove the $ sign earlier, dint i
  17. you shud be, and i dun drink, ill take pepsi
  18. [code] <?                             if (isset($_post['$submit_data']))                 {                echo "Test completed!";             }                         ?> [/code] Simple as that it should be $_POST['submit_data'] not $_post['$sudmit_data'] [code] <?                             if (isset($_POST['submit_data']))                 {                echo "Test completed!";             }                         ?> [/code] bumped i was posting while u did I dont think PHP is case sensative and ya right Ferenc
  19. I started with PHP in easy steps (good for a newbie) and then now i use PHP cook book to get to know things i dont already know like some libraries and stuff
  20. Actually i have never even heard of these companies but that dosent matter here. go to http://www.hotscripts.com/PHP and have a look around the scripts, and you might find some scripts for SMS here also.
  21. Its simple [code] <?php if($_GET[name]) //line 119 { $name = $_GET['name']; $query = mysql_query("SELECT * FROM programs WHERE programname = $name") or die(mysql_error()); $qarray = mysql_fetch_array($query); $count = $qarray['count']; $count = $count + 1; $update = mysql_query("UPDATE programs SET count = '$count' WHERE id = $qarray['id']") or die(mysql_error()); //line 126 echo(" <meta http-equiv=\"Refresh\" content=\"0; URL=http://dreamshowstudios.net/programs/$name.exe \" /> "); exit(); } //line 131 ?> [/code] [code] <?php if($_GET[name]) //line 119 { $name = $_GET['name']; $query = mysql_query("SELECT * FROM programs WHERE programname = '$name'") or die(mysql_error()); $qarray = mysql_fetch_array($query); $count = $qarray['count']; $count = $count + 1; $update = mysql_query("UPDATE programs SET count = '$count' WHERE id = '$qarray[id]'") or die(mysql_error()); //line 126 echo(" <meta http-equiv=\"Refresh\" content=\"0; URL=http://dreamshowstudios.net/programs/$name.exe \" /> "); exit(); } //line 131 ?> [/code] you see you need to put '' around data for mysql and also you use $VAR['name'] when you dont include it in a string and have "" around it. In such case when you use "" around it becomes $VAR[name]
  22. thats difficult but caption ck would tell you how to do it without telling you the script 1st Use the script to save the uploaded file somewhere 2nd Create a page which uses the GET method to get the file name and it shows the image resized 3rd The first script should get the contents of the 2nd script after giving it the get parameters (eg fread("image.php?url=uploads/pic.gif&h=100&w=100", filesize("image.php?url=uploads/pic.gif&h=100&w=100")); ) 4th Now save the fread data in the database 5th Delete the image which was used to resize (uploaded image) END I know this would take time and i dint give you the script, cause its getting around 12am here and i have school tomorrow and hav to get some sleep.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.