Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. Ghost

    PHP Can you help me confirm the purpose of this code?

    'W_AMOUNT' => number_format($withdrawal->amount / 2, 2), Pretty sure you can just do the / 2 part after $withdrawal->amount and it's good to go if you want to show half amounts!
  2. Ghost

    PHP Can you help me confirm the purpose of this code?

    $withdrawal_history = ""; This is just setting the history string to be blank, nothing. if ($pt->setting_page == 'withdrawals') { If we're on the page for withdrawals... let's access withdrawals: $user_withdrawals = $db->where('user_id',$pt->user->id)->get(T_WITHDRAWAL_REQUESTS); The user...
  3. Ghost

    PHP Help with getting correct amount into table column

    Is the column in the database an integer column? Does it allow decimals? Does $db->update treat this money column in the T_USERS table as an integer, or as a double? For example... $db->bind_param("id", $decimal, $decimal); ... this code would turn the first parameter into an integer because the...
  4. Ghost

    HTML & CSS Sticky Nav, put on bottom originally

    Since two members are saying it works, it likely is something related to your browser / JS. Another thing it could be is your browser caching previous HTML/JS. Try incognito mode, a hard-refresh, or clearing the cache manually. It's most likely related to that CSS file being cached in my opinion.
  5. Ghost

    HTML & CSS Modify Mailerlite form to redirect to TY page

    I'm like 90% certain that if you add the redirect into the success function it'll work, but I can't test it on my end. ml_webform_success_4828358 could have window.location.href=""; put into it to run as soon as the form has a success return... if that is when it runs of course. You can also...
  6. Ghost

    PHP update submit button not updating specific row

    In this image below, you have 4 question marks in your query, but only 3 bind parameters - but the code you are posting here on Codeforum has 4. Are you running different code than the code you posted? That is why your query is failing in that image - you need your 4th bind param set^^ In the...
  7. Ghost

    What would be the learning path for mobile development, and would you become a software engineer for it?

    If you want to get started then I would recommend either learning some HTML/Javascript and using PhoneGap to port your app over - You could also play with Electron to build software for your computer this way. If you want to build native apps then I highly recommend learning Java first and...
  8. Ghost

    PHP Can Someone help me send this web form to "welcome.php" to my email address [email protected]

    I'm glad you figured it out! Does this use mail() function? One thing worth noting is that not all servers support default mail(). For example, at our company we often use phpMailer, a class that allows us to handle mailing with easy to change settings. It allows for more flexibility, proper...
  9. Ghost

    Python How can i use this to translate entire words at a time?

    Hello! I am so glad I saw this. There is a much easier way to convert to binary! You do not need your if statements! while True: n = input("Ltr:") # use raw_input in python 2x or input() preferred if len(n) > 0: binarystring = ' '.join(format(ord(letter), '08b') for letter in n)...
  10. Ghost

    CSS How do I only show the first element using css

    Pretty sure you can use "first-of-type" selector in CSS to make sure the first in-conversation-wistia in your main 'section' is shown while others are not. Glad you solved it though. For future, look into first-of-type, first-child, etc.
  11. Ghost

    Hi!

    Welcome, what type of code do you like best?
  12. Ghost

    Fun activity Say hello... in a coding language!

    I wrote a function that can take a command "s" and interpret anything after it as an echo. It could obviously be expanded to allow other shorthand code... <?php function fakephp($string){ $endofline = "<br>"; // use PHP_EOL for console / server outputs //echo "the string is".$string; $lines...
  13. Ghost

    HTML & CSS Issue with 3 stack elements

    Onmouseover, onmouseout, etc... Similar to on hover. Basically on mouse over means "when visitor's mouse moves over the element" and on mouse out is when they move their mouse off / away from / out of the element. So if I have a box with id="box" I could do: var mybox =...
  14. Ghost

    PHP PHP Development For Cryptocurrency?

    I agree with him to an extent and the reason is that many crypto apps interact with various blockchains and PHP is not efficient if you are doing any sort of mining, validating, etc. It simply can't compare to lower level languages that are much faster, lightweight, and able to harness the power...
  15. Ghost

    PHP update submit button not updating specific row

    You are correct that auto-increment will add the ID for you. You do not need to supply the ID for an insert. You do however need to add an ID for an update, so you're correct. I do not see any issues with your code - As long as ID is actually set. However, I wonder if you are passing in NULL...
  16. Ghost

    PHP PHP Development For Cryptocurrency?

    PHP 7+ made huge improvements to speed, and that will continue most likely. However, I love Python > PHP for sure too!
  17. Ghost

    PHP PHP Development For Cryptocurrency?

    Today I want to start a discussion about cryptocurrency and PHP development. A lot of people prefer to use other languages because PHP has some efficiency issues. However, there are many apps and websites that are powered by this. The newest versions of PHP obviously can do almost anything you...
  18. Ghost

    PHP How to resize an image with fixed height but auto size the width in PHP?

    Glad you sorted it out. If you need further help, you can check out some of my image tools on Github. They're coded in Python, but the logic & math is the same so it can be easily converted to PHP: Bulk Photo Trim - https://github.com/NerdiOrg/bulk-photo-trim Smart Crop Size -...
  19. Ghost

    PHP PHP Query Issue

    You can use a UNION SELECT if you want to combine the results of two separate selects. You could also just select straight from the feeds and do a subquery (WHERE account id IN (select myuserid, usersifollow...) You could do a LEFT JOIN to get all results, but then in your WHERE you could put...
  20. Ghost

    Python input/function (help)

    You're welcome! Don't forget to mark the answer / thread as solved. You can PM me if you have any other questions but I am not always online
Back
Top Bottom