Jump to content

shaddowman

Members
  • Posts

    10
  • Joined

  • Last visited

shaddowman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think it will be like this From <input type="text" size="10" name="condition" class="do_input" value="<?php echo get_post_meta($pid, 'condition', true); ?>" /> To Suppose the value will be "Other" <select> <option value="<?php echo get_post_meta($pid, 'condition', true); ?>" selected="selected"><?php echo get_post_meta($pid, 'condition', true); ?></option> <option value="New">New</option> <option value="Ued">Used</option> </select> You need to put logic in the "selected" attribute whether if it's selected or not by using tertoary operator.
  2. I think you need to use the built in PHP function "curent" for this array. <?php $theArray = array("first", "second", "third"); print_r(current($theArray)); ?> Please look at the reference php.net/manual/en/function.current.php
  3. Some ISP does not permit you to send emails using default port 25 try to change that (php.ini) to port 26. Restart the web server and test it again.
  4. $sql = $db->Query(" SELECT `users`.`id` AS `userID`, `users`.`fullname` AS `fullName`.`mobile` AS `mobile`,`entries`.`time` AS `time` FROM `users` JOIN `entries` ON `users`.`id` = `entries`.`userID` WHERE `entries`.`time` BETWEEN CURDATE() AND CURDATE() - INTERVAL 8 DAY") or die(mysql_error()); I think you need to use date aritmethic functions like DATEADD and DATEDIFF. Please follow this URL http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_datediff Example: Select date_add(curdate(), interval 31 day);
  5. I think the condition for the email and password should have a seperate IF segment. Based in the code If the city returns true. Password and Email will not be evaluated.
  6. I think this is vague. Are you using an API? Maybe there is an option/function there to get an array object of the cart / cart. If not maybe you can use the order id or the payment id to dig into the database to search for the related products / product name.
  7. I think a good way to put it in mySQL is by exploding each line and getting it's element inserted in the database one by one. So you're going to read each line and explode it, then insert it to the database then move to the next line. Another way is to parse it and put all in object array and then insert it in the database.
  8. I think the best possible solution is the use of built in PHP function parse_url. You can extract the domain name and might get the exact domain name by the help of string manipulator functions susch as substr() and strpos() <?php $url = parse_url("http://123.456.imageshack.us/image.png"); print_r($url); ?>
  9. I think you need these to change palces. You need to start the session first. session_id($_POST['sid']); session_start();
×
×
  • 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.