Jump to content

xangelo

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

About xangelo

  • Birthday 01/27/1988

Contact Methods

  • Website URL
    http://xangelo.ca

Profile Information

  • Gender
    Male
  • Location
    Canada

xangelo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That's the problem. Your output has already started on line 44, you can't send headers after you already have output unless you are buffering. Read the sticky: http://www.phpfreaks.com/forums/index.php?topic=37442.0
  2. From my understanding "blend modes" are not a native component of anything. They are algorithms for modifying an image. Technically you would either need to find these algorithms yourself or write your own.
  3. The reason you're getting that error message is because you never closed your php tag before you started typing out html. Change line 44 to mysql_close();?>
  4. What's the error that is appearing?
  5. You're almost there. Try this: <?php echo date('F j, Y',$_SESSION['date']); ?>
  6. Glad to help. One thing I would suggest, however, is to sanitize your input variables before you insert them into your database. http://php.net/manual/en/function.mysql-real-escape-string.php
  7. Oddly enough apple has a pretty in depth guide regarding SOAP. http://developer.apple.com/internet/webservices/soapphp.html Just to clarify, the PHP code is just going to serve as a middleman correct? Something pushes data to the PHP script, which in turn relays it internally on your clients network? Or will the PHP script be requesting some data from Salesforce which it will then push internally?
  8. Not a problem, glad to be of help.
  9. The easiest way is use PHP's sessions to store all the information between pages. You could leave app_form_1.php without the session code since it doesn't need to maintain any information. On submit (ensure the action is app_form_2.php, not just app_form_2) it will send the details of your form to app_form_2.php This is what the start of app_form_2.php could look like. Make sure the session_start(); method appears at the VERY top of your page. <?php session_start(); $_SESSION['firstname'] = $_POST['firstname']; ?> <form id="form1" name="form1" method="post" action="app_form_3.php"> Lastname: <label> <input type="text" name="firstname" id="firstname" /> </label> </form> <p> <label> <input type="submit" name="Continue" id="Continue" value="Continue" /> </label> In this way, app_form_3.php would look like this: <?php session_start(); /* * To change this template, choose Tools | Templates * and open the template in the editor. */ $_SESSION['lastname'] = $_POST['lastname']; ?> <form id="form1" name="form1" method="post" action="app_form_process.php"> Email address: <label> <input type="text" name="emailaddress" id="emailaddress" /> </label> </form> <p> <label> <input type="submit" name="submit" id="Submit" value="Submit" /> </label> Your app_form_process.php only needs to be modified slightly: <?php session_start(); $firstname = $_SESSION['firstname'] ; $lastname = $_SESSION['lastname']; $emailaddress = $_POST["emailaddress"]; Let me know if you run into any other problems.
  10. As per your code, you're not calling mysql_query properly and you're not calling it in the right spot. Since you want it to execute for each loop, it should be more like this: $query = ("SELECT `propertyref` FROM `feed_property` WHERE `status` = 'Sold' ")or die(mysql_error()); $result = mysql_query($query); if (isset($result)) { while ($row = mysql_fetch_array($result)) { $ref1 = mysql_real_escape_string($row['propertyref']); $query1 = "DELETE FROM `feed_property`, `feed_images`, `feed_characteristics`\n" . "USING `feed_property` INNER JOIN `feed_images` INNER JOIN `feed_characteristics`\n" . "WHERE feed_property.propertyref = '$ref1'\n" . " AND feed_images.propertyref = feed_property.propertyref\n" . " AND feed_characteristics.propertyref = feed_property.propertyref; "; if(!mysql_query($query1)){ echo '<h1 style="color: red;">Error</h1><p>', mysql_error(), '</p>'; } else { echo '<h1 style="color: red;">Properties have been removed from the database</h1>'; } echo $query1; } }
  11. Assuming the data format stays the same, here's a much easier way: $data = "<a href=''>Arbitrary characters. Bla bla bla</a><p>123456789</p><p>$10,100</p><p>01/02/2010</p><p>01/02/2011</p>"; list(,$str_1,,,$str_2) = explode('<p>',$data); $str_1 = substr($str_1,0,strlen($str_1)-4); $str_2 = substr($str_2,0,strlen($str_2)-4); What this does is split your string into an array at every '<p>', then it assigns it to some variables by using list(). Finally, it strips of the trailing '</p>' that is present. http://php.net/manual/en/function.list.php http://php.net/manual/en/function.explode.php http://php.net/manual/en/function.substr.php http://php.net/manual/en/function.strlen.php
  12. The 3rd argument is an offset from the start of the string, not from the matches. So $opening_fourth_p = strpos($data, '<p>', 4); starts from the 4th character of $data, not the fourth occurrence of <p>. Also, in general, offsets are 0indexed. http://php.net/manual/en/function.strpos.php
  13. Most likely the path you are passing to mkdir does not actually point to the location you're trying to create the file in. Since you're calling mkdir from Setting/time/index.php it looks like you want to create the folder IN that directory. Try: mkdir('./'.$id); or use the following to see where exactly you are creating that new directory. mkdir("../Setting/time/".$id,0,true);
  14. If you dump the data in PHP before you put in the database is the data still being mangled? Or does that only happen when it's inserted?
  15. This isn't actually a php question, it's a javascript one. Basically in order to do this you need to use some mechanism in javascript to query this page in the background. There are plenty of javascript frameworks (jQuery, MooTools etc.) that provide something called an "AJAX" implementation. Basically, you can provide a URL to these javascript methods and it will essentially "visit" the page in the background. It will then return whatever string you want. For example, in jQuery, you would do something like this: $.ajax({ url: 'path/to/your/file.php', dataTye: 'text', success: function(data) { // data is the string from file.php } }); Now you would just need to modify your .php file to echo whatever you want to display
×
×
  • 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.