Jump to content

phpmady

Members
  • Posts

    205
  • Joined

  • Last visited

Everything posted by phpmady

  1. I need to write a curl functionality, where the datas are stored in the table format. I need to write a function to read all the <tr> and its <td> <td> contains text and link like the below. could anyone help me how to read a text along with the link. for example: <table> <tr> <td> <div> <a href="link.html">td data </a><div></</td> <td> <div> <a href="link.html">td data </a><div></</td> </tr> <tr> <td> <div> <a href="link.html">td data </a><div></</td> <td> <div> <a href="link.html">td data </a><div></</td> </tr> </table>
  2. Hi, I tried to create a array, with the following php code, but am failed whats wrong am doing here? $query = "SELECT user_id,f_name FROM user_profile"; $result = mysql_query($query); echo $result; while ($row = mysql_fetch_array($result)) { $results['f_name'] = $row['user_id'] ; }
  3. Hi, I need to create a array like below, from the table: $items = array( "Great <em>Bittern</em>"=>"1", "Little <em>Grebe</em>"=>"2", "Little <em>Grebe</em>"=>"3", "Little <em>Grebe</em>"=>"4" ); users table has 2 columns: id name Thanks, Mubarak.A
  4. Hi, Actually one table have more records(100k), and another table have few number of records(200), thats the reason we have designed the schema. so pls help me to make ion auth for 2 diffrent groups thanks
  5. Hi friends, I have a 2 different user types : one type using the tables: gold_auth gold_user and another one with: silver_auth silver_user I assume that changes in config table like the following can do a trick for me. How to handle the user type: can i do some thing like this: if(gold) { config(gold_auth.php); } else { config(silver_auth.php); } Thanks,
  6. Thank you, more useful for me, nice to know the correct keyword mysql hierarchy Thanks
  7. Hi, I have the project where i want to get the structure like tree. My table structure: Section_Id Section_Parent Section_Name 1 0 America 2 0 China 3 1 New york 4 1 Washington 5 2 Buffalo How to retrieve the records.. I need a structure like this in a select button: America New york Buffalo Thanks,
  8. Hi, I am calling the sms service provider server with the following code $url = $urlAccount_home."?username=".$userAccount."&password=".$passAccount."&number=".$number."&sender=".$userSenderSMS."&msg=".$msg; if (!($fp =fopen($url,"r"))) echo "<br><center>خطا في الاتصال </center><br>"; $result =fread($fp,10); fclose($fp); When sending sms to 1 person no problem, but when sending sms to more than 1 person example for a group, i will poll the serve in loop... what am afraid is calling the server more than once continuously, wont affect the service?
  9. But i am geting the result like this 1970-03-02
  10. Hi guys, $T_Start_Date = "2011-10-23"; $P_Days = "30"; I tried this Its working: $T_End_Date = date('Y-m-d', strtotime("+$P_Days days"); but why am not getting this: $T_End_Date = date($T_Start_Date, strtotime("+$P_Days days")); thanks
  11. Or u can use zend encoder ioncube is little bit cheaper than zend.
  12. hi mjdamato, thank you for your knowledge transfer to me, because am the guy who dont have much knowledge about the process running in professional companies, with your guidance, i am planning to make: 1. Duration of the Package in days. 2. Amount in USD(because am going to use the service paypal) 3. Upgradation Plan: when he upgrade for example: basic to silver Basic 90 days: Gold 120 days: in middle of basic, he upgades to gold, the he will have remaining 45 days + 120 days ok, thank you friend
  13. Hi Guys, I building a system, where i have a customer table where user info is saved, and customer can choose the package like silver, gold, and platinum customer table: ID Username Password Name Address Active Now i want to make a table for choosing packages: package table: Package_ID Package_Name Package_Description Package_Duration Package_Amount Package_Active 1.Now my doubt is, whether Duration can be kept in days/month for example: 90 days or January, February, March 2.Package_Amount: what currency to be specify. Because am building a system for international users, what currency to be specify. (500 INR or 10USD) 3. what about upgrade of package: give me some ideas how to handle this. Please Help me, and i guess i have a design a table right. Thanks,
  14. Hi Guys, I building a system, where i have a customer table where user info is saved, and customer can choose the package like silver, gold, and platinum customer table: ID Username Password Name Address Active Now i want to make a table for choosing packages: package table: Package_ID Package_Name Package_Description Package_Duration Package_Amount Package_Active 1.Now my doubt is, whether Duration can be kept in days/month for example: 90 days or January, February, March 2.Package_Amount: what currency to be specify. Because am building a system for international users, what currency to be specify. (500 INR or 10USD) 3. what about upgrade of package: give me some ideas how to handle this. Please Help me, and i guess i have a design a table right. Thanks,
  15. Hi, I have a project with products gallery, with two languages arabic and english I have a table structure Product_ID Product_Name Product_Description Language_ID(arabic - 1, english-2) examples: 1- Dell show to arabic users - arabic laptop description- 1 2 - Dell shown to english users- english laptop description - 2 Now i want to update this project into shopping cart, How can i go from here , for shopping cart. Looking for really some ideas. Thanks,
  16. Hi, As u said, i have placed my code ..if u go through the js code i have made, u can find that.. Thanks
  17. Hi, I am calling the ajax twice in a page, <div class="login_form"> <div class="row"> <span class="label">رقم الجوال<span class="men">*</span></span> <span class="formw"> <input type="text" class="textbox_forms required" name="SMS_Mobile" id="SMS_Mobile" size="50" onblur="[b]chkUser[/b](this.value);" dir="ltr"></span> </div> <div class="row" id="[b]user_already[/b]"> </div> <div class="row" id="choose_any_type"> <span class="label">Send By</span> <span class="formw"> <span> م : <input type="radio" value="format_message" name="message_type" onclick="call_format_message();"> </span> <span> ش : <input type="radio" value="custom_message" name="message_type" onclick="call_custom_message();"> </span> </span> </div> <div id="div_format_message" style="display:none;"> <div class="row1"><span class="label">Format Message</span> <span class="formw" dir=""> <select name="F_ID" id="gt" onchange="[b]ajax_call_format_message[/b](this.value);"> <option value="">Select SMS Template</option> <!-- START BLOCK : format_msg_send_one --> <option value="{F_ID}" {for_selected}>{F_Title}</option> <!-- END BLOCK : format_msg_send_one --> </select> </span> </div> <div class="row" id="show_div_format_message"> </div> </div> </div> when i am calling the chkUser actually am asking to bring the ajax content in the div called <div class="row" id="user_already"> </div> but the content is placing the div called <div class="row" id="show_div_format_message"> </div> Why its placing the content in a different location. Here is my js for chkUser // JavaScript Document var xmlhttp; //function namechange(name_fieldvalue) function chkUser(mobile_number) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support XMLHTTP!"); return; } var url="ajax_user_operate.php"; url=url+"?mobile_number="+mobile_number; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) { document.getElementById("user_already").innerHTML=xmlhttp.responseText; } } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } and js for ajax_call_format_message(); // JavaScript Document var xmlhttp; //function namechange(name_fieldvalue) function ajax_call_format_message(F_ID) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Your browser does not support XMLHTTP!"); return; } var url="ajax_show_format_message.php"; url=url+"?F_ID="+F_ID; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) { document.getElementById("show_div_format_message").innerHTML=xmlhttp.responseText; } } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } I seriously doubt the Js file, am i doing wrong.. Thanks,
  18. Hi, I am still able to read Arabic Characters by using UTF-8 Thanks
  19. Hi, <meta http-equiv="Content-Type" content="text/html; charset='utf-8" /> The above meta tag with utf-8, will make the task easier for any language. Thanks,
  20. Its Not Possible, and it is always better to do like this <?php if($_POST['user']=="user.php") Location("user.php"); else Location("staff.php"); ?>
  21. Hi, You can use the following function to encrypt the password.. function createRandomPassword() { $chars = "abcdefghijkmnopqrstuvwxyz023456789"; srand((double)microtime()*1000000); $i = 0; $pass = '' ; while ($i <= 7) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } //function to create password $ran_password = createRandomPassword(); //use md5 to encrypt the password //md5 is php function to encrypt the password $md5_ran_password = md5($ran_password); $sql = "UPDATE client_employer SET CE_Passwd = '".$md5_ran_password."' WHERE CE_Email = '".$email."'"; Thanks
  22. Hi, Please Post your question in MYSQL section Thanks,
  23. Hi, It Seems you are not updating the new password to the table, Check ur Update script, use var_dump or echo to check the valriable $new_pass ="asdf"; $SQL = "UPDATE TABLE_NAME SET password = $new_password WHERE email = $email"; Thanks,
  24. Hi, This is the logic you have to do, 1. User Registered. 2. User Login, Use sessions to find out user login or not. 3. if session exists, make logged in user to write the comment. Thats it, All the best
  25. Hi, http://www.phpclasses.org/package/3564-PHP-Compose-and-send-e-mail-messages-with-attachments.html Try this php class, to send the attachment.
×
×
  • 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.