Jump to content

john_zakaria

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

john_zakaria's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi everyone.. please i want to know how to create a cron job from a file in php i made this command but it does not get any response. it get the error die message i made it in php and i serched online in google and many websites and i did not solve my problem my php command is: exec("crontab -e * * * * * /usr/local/bin/php -f /home/survey/public_html/john/cron/snd2.php") or die ("<br><br>Error in executing Cron file"); so i want to create or use my cron job using php.. any help
  2. hi everyone please i want to print the value of the variables $myradiobutton1 $myradiobutton2 $myradiobutton3 $myradiobutton4 ....... $myradiobutton10 i made a for loop to print the values of each $myradiobutton($i) but i can not print it ... can anyone help me the code is for($i = 1; $i < 11; $i++) { echo $myradiobutton.$i.'<Br><BR>'; } please try to fix this problem thnx in advance
  3. in this php code the data is posted from a form and will be mailed to my e-mail but my problem is that when Using the php mail function with godaddy , i did not receive the mail the system is linux and for more details for phpinfo click on the following link http://projects.kayandco-egypt.com/untitled2_old.php really i need help to fix this problem today..... i tried to see many forums but i dont have the solutions yet i tried also to use phpmailer but it did not help me if anyone have a function or any solution for this problem plz send for me <? session_start(); header("Cache-control: private"); // IE 6 Fix if ($_POST["name"]) { foreach ($_POST as $key => $value) { $$key = trim($value); $_SESSION[$key . "_b"] = $value; // echo "Key: $key; Value: $value<br />\n"; } $kind = "mail"; $messageo = ' <html> <head> <style> body { font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #737373; text-align: justify; width: auto; margin-right: 0px; margin-left: 0px; margin-top: 10px; margin-bottom: 10px; line-height: 17px; } .padding { padding-left: 30px; background-color: #cdcdcd; color: #023061; height: 30px; vertical-align: middle; } .padding2 { padding-left: 30px; background-color: #E5E5E5; color: #023061; height: 30px; } .title1 { font-size: 17px; font-weight: bold; color: #023061; padding-top: 20px; padding-bottom: 25px; font-family: Arial, Helvetica, sans-serif; text-transform: uppercase; } </style> </head> <body> <div class="title1" align="center">mail</div> <table width="50%" border="0" cellspacing="1" cellpadding="4" align="center"> <tr class="padding"> <td width="30%"><strong>Name <b></strong> </td> <td >' . $name . '</td> </tr> <tr class="padding2"> <td ><strong>E-mail </strong> </td> <td >' . $emal . '</td> </tr> <tr class="padding"> <td><strong> City </strong> </td> <td>' .$city . '</td> </tr> <tr class="padding2"> <td><strong>Country</strong> </td> <td>'.$country.'</td> </tr> <tr class="padding"> <td><strong>Telephone</strong> </td> <td>' . $tel.'</td> </tr> </table> </body> </html> '; //echo $message; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=windows-1256\r\n"; $headers .= "From: info@abcc.com>\r\n"; $headers .= "cc: abc@abc.com\r\n"; $ok = mail("abc@abc.com", $kind, $messageo, $headers); } header("Location: welcome.php"); ?>
  4. now i have this form and i want to get todaysdate in the text box named today_date after that i want the user to enter a date in entered_date and i want to compare this date with today_date and show the answer i dont know how to make it using php i need a full help wiz code can anyone helps me?? <table width="600" border="0" cellspacing="0" cellpadding="0"> <form id="1" name="1" method="get" action="test1"> <tr> <td width="40%"><label for="today_date">Today Date <br> <span class="style1">( Date format is dd-mm-yyyy)</span></label></td> <td width="20%" align="center" valign="middle"> </td> <td width="50%"><input type="text" name="today_date" id="today_date" readonly onblur="return datediff();" /></td> </tr> <tr> <td><label for="entered_date">Entered Date<br> <span class="style1">( Date format is dd-mm-yyyy)</span></label></td> <td align="center" valign="middle"> </td> <td><input type="text" name="entered_date" id="entered_date" onblur="return datediff();"/></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td>Date Difference</td> <td> </td> <td><label for="difference"></label> <input type="text" name="difference" id="difference" readonly /></td> </tr> </form> </table>
  5. Now i have this page and in the image part i want to passs the id in the selected row to the page delete.php and after that deleteing this row <a href='delete.php?id='$id'><img src='untitled.jpg' width='10' height='11' border='0' /></a> i want here to set the id to be like the id in the database to use it in the where condition. can anyone help me on how to set the vaiable$id to be like the id in the selected row? but till now i can not pass the id to the next page <? $DBhost = "localhost"; $DBuser = "root"; //$DBpass = "123456"; $DBname = "gateway"; /// 1. create a database connection $connection = mysql_connect($DBhost, $DBuser) or die ("database connect error: " . mysql_error()); //// 2. select a database to use $db_connect = mysql_select_db($DBname, $connection) or die ("database select error: " . mysql_error()); ///// 3. Perform database query $qryp = "SELECT * FROM hotels"; print "qryp: " . $qryp . "<br>"; $result = mysql_query($qryp) or die ("table error: " . mysql_error()); ?> <table border="1"> <tr> <td> ID </td> <td>Hotel </td> <td>Tel</td> <td>Tel2</td> <td>Fax</td> <td>Contact Person</td> <td>E-mail</td> <td>Notes</td> <td></td> </tr> <p> <? $hotel_name=$_POST["hotel_name"]; $tel=$_POST["tel"]; $tel2=$_POST["tel2"]; $fax=$_POST["fax"]; $contact_person=$_POST["contact_person"]; $emal=$_POST["emal"]; $notes=$_POST["notes"]; ?> <? $qryp2="INSERT INTO `hotels` ( `Hotel_Name` , `Tel` , `Tel2` , `Fax` , `Contact_Person` , `E-mail` , `Notes` ) VALUES ( '$hotel_name', '$tel', '$tel2', '$fax', '$contact_person', '$emal', '$notes' )"; $result2 = mysql_query($qryp2); ///// 3. Perform database query $qryp = "SELECT * FROM hotels"; print "qryp: " . $qryp . "<br>"; $result = mysql_query($qryp) or die ("table error: " . mysql_error()); //// 4. Use returned data while ($tr_res = mysql_fetch_array($result)){ echo "<tr>"; echo "<td>" . $tr_res['id'] . "</td> <td>" . $tr_res["Hotel_Name"] . "</td> <td>" . $tr_res["Tel"] . "</td> <td>" . $tr_res["Tel2"] . "</td> <td>" . $tr_res["Fax"] . "</td> <td>" . $tr_res["Contact_Person"] . "</td> <td>" . $tr_res["E-mail"] . "</td> <td>" . $tr_res["Notes"] . "</td> <td> <a href='delete.php?id='$id'><img src='untitled.jpg' width='10' height='11' border='0' /></a></td> "; echo "</tr>"; } echo("</table>"); ?>
  6. now i have a database and a from. i can now insert data from a form into mydatabase but till now i'm trying to update data and i can not after that i treid to delete data and i can not reach it also can anyone help me
  7. i have these to links as RSS 1) http://rss2.arabfinance.com/AfTickerPriceDA.rss?key=141221161187821572925312622387221798476206 2) http://rss2.arabfinance.com/AFMarketSummary.rss?key=16667190235322823924120121241210146232101229 i am trying to read these RSS using php but till now i can not read it and i want to make a full control to display whatever i want in my page usning RSS can anyone have a full source to read rss?? or how i can do it? thnx and best regards
  8. -------------------------------------------------------------------------------- i want to make the following using cookies When any user access the website, if this is the first time for him, he has to fill a form as follows Name Email City Country Telephone number [area code] + [phone number] After filling the above fields and submitting, the site wants all above to be saved on users machine as cookies, so that, after submission, when you close the browser, even the computer itself is closed and you opened the website again, you’ll not find the form with fields above, you’ll find instead the data inserted before. plz can anyone help me to do the following , i want to know if this need a database or not? and how to make it? i made this in page index.php <html> <body><form action="welcome.php" method="post"> Name: <input type="text" name="name" id="name" /> City: <input type="text" name="city" id="city" /> <input type="submit" /> </form></body> </html> and in welcome.php <html> <body>Welcome <?php echo $_POST["name"]; ?>.<br /> You are From <?php echo $_POST["city"]; ?> .</body> <? $expire=time()+60*60*24*30; setcookie("user2", $_POST["name"], $expire); //setcookie("user", "", 60); ?> <? if (isset($_COOKIE["user2"])) echo "Welcome " . $_COOKIE["user2"] . "!<br />"; else echo "Welcome guest!<br />"; ?> </html> i tested if i got it from my form and after that i tried to print my cookir name but it did not work can u help me plz
×
×
  • 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.