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. C

    PHP Can you tell me what this code is missing?

    Can you tell me what this code says, and if this code makes sense and if it is missing something? else if ($page == 'category') { if (!empty($_GET['id'])) { if (in_array($_GET['id'], array_keys($categories))) { $pt->page_url_ =...
  2. C

    PHP Help with getting Search Form to search within

    Thank you, but no change. Any additional help is welcomed How can I have it so it's something like where sub_category = "the name of subcategory" ?
  3. C

    PHP Help with getting Search Form to search within

    Thanks for all the previous help. The web video script that I’m modifying successfully filters videos into categories and subcategories. I’ve added this Search Form which appears on subcategory html results pages: <?php if (preg_match('#/?sub__(\d)+\b#',$_SERVER['REQUEST_URI'],$matches)) { echo...
  4. C

    PHP Help with referencing url in code

    Thank you that worked. if(stristr($_SERVER['REQUEST_URI'],"sub_" )!== false) { but I have found that this also works: if (preg_match('#/?sub__[\d]+$#',$_SERVER['REQUEST_URI'])) { what is the difference between the two? And which one is best to use?
  5. C

    PHP Help with referencing url in code

    Thanks for your reply, however after putting this on the html page: <?php if(stristr($_SERVER['REQUEST_URI']), "sub_" !== false) { echo "Found sub_ in URL!"; } ?> I get a 404 error. Any additional suggestions are appreciated
  6. C

    PHP Help with referencing url in code

    I am trying to display something on web pages that show this in the url: “sub__” for example: …com/videos/category/1/sub__536. It was suggested that I try some code like this: $page = basename($_SERVER['PHP_SELF']); if ($page=="content.php") { echo Hello World; } elseif ($page=="content.php") {...
  7. C

    JavaScript Can you tell me what this code says/does?

    ------------resolved-------------------------
  8. C

    PHP Help with displaying search form when sub-category page appears

    Many thanks for your reply. After looking at your reply and suggestion, I see this part on the html page, might be more helpful: <script type="text/javascript"> $(document).on('change', '#category_id', function(event) { event.preventDefault(); id = $(this).val()...
  9. C

    PHP Help with displaying search form when sub-category page appears

    Thanks for all the previous help. The web script that I'm trying to modify successfully allows for the ability to search the site by keyword, and filters results by category and by sub-category. I am trying to display a search form when sub-category page appears (as a first step in creating the...
  10. C

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

    In this web script, that I'm trying to modify, it has this section of php code: $withdrawal_history = ""; if ($pt->setting_page == 'withdrawals') { $user_withdrawals = $db->where('user_id',$pt->user->id)->get(T_WITHDRAWAL_REQUESTS); foreach ($user_withdrawals as $withdrawal) {...
  11. C

    JavaScript Help with getting share-video info to appear

    This code works on another page, but I’m trying to use it (move it) on a new page. I believe I have copied all that is needed, but it does not display the share-video form. I don’t know a lot about javascript so, I thought I’d start here. $(function () { $('#share-video').on('click'...
  12. C

    PHP Help with getting correct amount into table column

    What I'm trying to accomplish, is that every time an amount gets updated to the uploaders 'balance' column, half that amount gets updated(added to) into the uploaders 'money' column. However, using the code below, when the amount '3' is added to the 'balance' column, just '1' gets added to the...
  13. C

    Help with changing this sql code

    I didn’t write this web script code, but I’m trying to modify it. I am attempting to have this: $get_videos = $db->rawQuery("SELECT DISTINCT(v.id), v.* FROM u_paid_videos AS upv LEFT JOIN " . T_VIDEOS . " AS v ON (upv.id_video = v.id) WHERE upv.id_user = {$user->id} AND upv.session_key =...
  14. C

    PHP resolved--

    In the php file this works successfully: // add data to table $insert_buy = $db->insert('u_paid_videos', [ 'id_user' => $user_id, 'video_play_price' => (string)$video_cost_new, 'id_video' => $video_id, 'user_id_uploaded' => $video->user_id...
  15. C

    PHP ----

    -----
  16. C

    JavaScript How to set a delay of 1 second to this js?

    Thanks for your reply. Here's the html: <div class="flex1-container"> <span id="min"></span>:<span id="sec"></span> </div> And here's my latest unsuccessful attempt at adding the delay code (the last 5 lines) into the js: var Clock = { totalSeconds: 0, start: function () { if...
  17. C

    JavaScript How to set a delay of 1 second to this js?

    This timer works successfully, but I'd like to add a 1 second delay before it starts, here's the code: var Clock = { totalSeconds: 0, start: function () { if (!this.interval) { var self = this; function pad(val) { return val > 9 ? val : "0" + val; } this.interval...
  18. C

    CSS Help with centering wrapped text

    Thanks for your reply. Here's the html: <div id="marqueecontainer"> <video id="jvideo" autoplay muted class="video-js vjs-default-skin" controls></video> <div id="marquee"> TEXT TEXT TEXT </div> </div><!--marqueecontainer-->
  19. C

    CSS Help with centering wrapped text

    I have tried many many ways to center this text without it wrapping in the middle of the page without success. Actually, it is centered but in a long vertical display, where the text lines wrap. Any suggestions to unwrap text but keep it centered are welcomed: #marquee { //position...
  20. C

    PHP Help with redirect after Upload

    The code I'm using on a web page allows the visitor to record a video via web cam and then when Upload is selected the recorded file arrives into the /uploads folder successfully. I'm trying to add a redirect to another page after the successful upload, but I added in the 'header(Location ...'...
Back
Top Bottom