Jump to content

DrTrans

Members
  • Posts

    179
  • Joined

  • Last visited

Everything posted by DrTrans

  1. I have a base64 encoded image -> http://pastebin.com/698ES5t0 Im trying to export this as a png file. $picture = {data on paste bin}; $picture = base64_decode($picture); file_put_contents('/home/picture.png', $Picture); Now this creates a file picture.png and i can open it in Preview/Gimp etc. However, if i upload the file to my website, the image does not render in chrome/firefox, however it does render in Safarai. It seems that there is no height/width/depth data.
  2. $('#giftname').on('click', function() { $(this).html("Searching..."); var name = $('#gift_name').val(); $.get('../action.php', { action: "giftuuid", giftname: name }, function(data) { giftitem(data); }); }) function giftitem(data) { var nullkey = '00000000-0000-0000-0000-000000000000'; if(data == nullkey) { alert("got a invalid key"); } else { alert("got a valid key"); } } For some reason i get the got a valid key every time as if its not comparing the strings.
  3. Looking on how to format this: $string = "(215.354100, 218.613800, 2501.263000)" into (215,218,2501)
  4. I can't seem to figure it out with explode, because of the multi character, and whole number. please assist further if you could.
  5. $string = "<214.27080, 204.10100, 2500.51300>"; need it parsed into 214/204/2500
  6. Thanks. I have fixed this. added $("#ReportModal").on('shown', function () { });
  7. Heres the second part .. don't know why its doing it. custom.js $("#GetReport").click( function (data) { ReportID = $('#reportID').val(); data.preventDefault(); $('#ReportModal').modal({content: data}); });
  8. So i have 2 files I'm working with I need to get ReportID to the Modal.php ajax handler modal.php <! Request Application !> <div class="modal small hide fade" id="ReportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="pull-right btn " data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Get Report</h3> </div> <div class="modal-body"> <script type="text/javascript"> $.ajax({ cache: false, type: 'POST', url: 'ajax/getReport.php', data: 'id='+reportID, success: function(invdata) { $('#report').show().html(invdata); } }); </script> <div id="report"></div> </div> </div>
  9. .littleNumber { position: fixed; font-size: 9px; color: white; font-weight: bold; display: inline-block; background: red; top: 3px; padding-left: 3px; padding-right: 3px; -moz-border-radius:1px 1px 0px 0px; -webkit-border-radius:1px 1px 0px 0px; -khtml-border-radius:1px 1px 0px 0px; border-radius:1px 1px 0px 0px; }
  10. only way you can disable a checkbox is to either .. us js.. ( $('#id-of-form-item').disabled(); or in php you can if ($value == "$DB_VALUE") { $disabled = " disabled"; } else { $disabled = ""; } html: <input type="radio" value="" name="" <?php echo $disabled; ?>" /> // Edited for Radio button, Re-read post. Originally had it as checkbox.
  11. mail($to, $subject1, $message1, $headers); // Send our email < don't need to redeclare variables...
  12. That would do every url that way that i pass to it. basically what I'm trying to do is... $text = " Im hanging out at http://blah.domain.com/directory/INFINITA/76/98/23" ; $text would return = "Im hanging out at INFINITA " with the "INFINITA" being hyperlinked to the original url. However, if $text = "Go look at this thread: http://forums.phpfreaks.com/topic/284414" it doesn't bother it.
  13. I want to do something like this: http://gyazo.com/dfee0f77931b6041f6b13ec8aee0effd How do i get the number on top of the image. my code looks like this: <a href="#" class="dropdown-toggle pull-right" data-toggle="dropdown"><img src="iconset/allfriends.png" class="headicon img-circle"><div class"littleNumber"><?php echo $amount; ?><b class="caret"></b></a>
  14. $ngLink = mssql_connect($ngServer, $ngLogin, $ngPassword) or die(mssql_get_last_message()); print_r($ngLink); Let us know what the response is from that print statement.
  15. Do you have an smtp server running on port 25? Assuming from that error you don't.. Looks like to you need to setup your server correctly.
  16. why do you need to use session_register()? for what purpose? also you have a " ; " between your { }
  17. Heres an updated code <?php ini_set("sendmail_from", "Website <website@google.com>"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="keywords" content="" /> <meta name="description" content="" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Yakity Yak</title> <link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'> <link href='http://fonts.googleapis.com/css?family=Abel|Satisfy' rel='stylesheet' type='text/css'> <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div id="wrapper"> <p><!-- end #header --></p> <div id="header" class="container"> <div id="logo"> <h1><a href="#">Yakity Yak</a></h1> </div> <div id="menu"> <ul> <li class="current_page_item"><a href="homepage.php">Homepage</a></li> <li><a href="trip.php">Destinations</a></li> <li><a href="contact.php">contact </a></li> <li><a href="registration.php">Login</a></li> <li><a href="adminlogin.php">Leader</a></li> <li></li> <li></li> </ul> </div> </div> <blockquote> <blockquote> <p> <center><img src="../../Documents/Unnamed Site 2/IMG_1913.jpg" width="999" height="388" alt=""/></center> </p> </blockquote> </blockquote> <div id="page"> <div class="post"> <h2 class="title"><a href="#">Contact US</a></h2> <div class="entry"> <table border='1'> </div> <table width="400" border="0" acellpadding="3" cellspacing="1"> <tr> <td><strong>Contact Form </strong></td> </tr> </table> </body> </html> <?php if (isset($_POST['submit'])){ $name = $_POST['name']; $mail = $_POST['email']; $message = $_POST['message']; $to = "dean-ueki@hotmail.com"; $subject = "New Contact us form"; $message = "A new message has been sent by $mail \n Their message was $message \n \n Their Details: \n Name: $name \n Email: $mail From:email@email.com\r\n\n"; if ($name) { if($mail) { if ($message){ mail($to, $subject, $message); echo "Thank you for your message"; } else { echo "Please enter some comments"; } } else { echo "Please enter an email address"; } } else { echo "Please enter your name"; } } else { //Form Built by TPGS //Form Edited by Keith ( DrTrans @ PHP Freaks). ?> <form action="contact.php" method="post"> Name: <input type="text" name="name" /><br /><br /> Email: <input type="text" name="email" /><br /><br /> Message: <textarea name="message" rows="20" cols="40"></textarea><br /><br /> <input type="submit" name="submit" value="Submit" /> </form> <?php } ?>
  18. ini_set("sendmail_from","Name <user@domain.com>"); <---- If you need to set the INI. But i don't see where $mail = ??
  19. ok so i have a url example" $url = "http://blah.domain.com/directory/INFINITA/76/98/23"; i need to be able to match specifically that its a domain of http://blah.domain.com/directory/, and be able to return the value of " INFINITA " Thanks in advance.
  20. HOLY CRAP. lol. I give this one up.
  21. Im looking for some help on how to write a function that will parse mailing address for ex. Address could be.. 1000 Programmer Way 1000 N Programmer Way P.O Box 321 Can someone help me build a function that will parse these into $street_number = " 1000 "; $street_direction = "N" < - based on if N, S, E, W, NE, NW, SE, SW and somehow for P.O. Box .
  22. Backstory. Im using Bootstrap Modal's , and i have a modal that opens up a file called test.php <script type="text/javascript"> $("a[data-toggle=modal]").click(function(data1) { var a_id = $(this).attr('id'); $('#appcontent').show().html('<p><img src=\"../images/loader.gif\" width=\"19\" height=\"19\" /></p>'); if(a_id >= 0) { $.ajax({ cache: false, type: 'POST', url: 'ajaxc/test.php', data: 'id='+a_id, success: function(data1) { $('#runtest').show(); $('#appcontent').hide(); $('#appcontent').show().html(data1); } }); }; }); </script> inside test.php i have a form <?php $submit = $_POST['submit']; if($submit) { print " I should be in the same modal box"; } ?> <form action = "test.php" method="post"> <input name="blah"> </form> When i submit this form it completely reloads the page all together.... and is not keeping it within the original modal box. How do i go about making the form submit within the modal box and basically i should see " i should be in the same modal box " without the box closing.
×
×
  • 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.