ChrisJ 15 Newbie Poster

I've added a SweetAlert into an existing upload Form, where upon selecting the Submit button it successfully displayed the pop-up alert. Like so:

$('#submit-btn').on('click',function(e){
e.preventDefault();
var form = $('.pt_upld_page_frm');
swal.fire({
title: "Are you sure?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, submit it!",
closeOnConfirm: false
}).then((result) => {
if (result.isConfirmed) { $('.pt_upld_page_frm').submit(); }

});
});

But, my goal is to have the "Yes, submit it" to actually submit the chosen uploaded file. But it didn't upload it.
So, I added code from farther down the file, into the alert, like so:

$('#submit-btn').on('click',function(e){
e.preventDefault();
var form = $('.pt_upld_page_frm');
swal.fire({
title: "Are you sure?",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, submit it!",
closeOnConfirm: false
}).then((result) => {
if (result.isConfirmed) {
$('.pt_upld_page_frm').ajaxForm({
   //$('#upload-form form').ajaxForm({
      url: '{{LINK aj/ffmpeg-submit}}?hash=' + $('.main_session').val(),
    beforeSend: function() {
       $('#submit-btn').attr('disabled', true);
       $('#submit-btn').val("{{LANG please_wait}}");
},
 success: function(data) {
         if (data.status == 200) {
window.location.href = '{{LINK home}}';
         }
         else if(data.status == 402){
            swal({
               title: '{{LANG error}}',
               text: data.message,
               type: 'error',
               confirmButtonColor: '#3085d6',
               cancelButtonColor: '#d33',
               confirmButtonText: 'OK',
               buttonsStyling: true,
               confirmButtonClass: 'btn btn-success',
            }).then(function(){
               window.location.href = '{{LINK upload-video}}';
            },
            function() {
               window.location.href = '{{LINK }}';
            });
         }
         else {
            $('#submit-btn').attr('disabled', false);
             $('#submit-btn').val('{{LANG publish}}');
            Snackbar.show({text: '<div>'+ data.message +'</div>'});
         }
      }
   });
//});
});
}
});
});

But now it submits successfully, but doesn't display the Alert first. The goal is to have the "Yes, submit it" to actually submit
Any guidance is welcomed.

ChrisJ 15 Newbie Poster

Thanks you for youre reply.
Sorry for the confusion.
I no longer am looking for help with a modal.
And this isn't about sweetAlert, it just about JS.
Sorry, for my my being unclear.
I have started another posting titled "Help with closing message box and submiting",
I hope its more clear

ChrisJ 15 Newbie Poster

I'm trying to add something to this JS, for a successfully working submit Form:

  $('#upload-form form').ajaxForm({
url: '{{LINK aj/ffmpeg-submit}}?hash=' + $('.main_session').val(),
beforeSend: function() {
$('#submit-btn').attr('disabled', true);
$('#submit-btn').val("{{LANG please_wait}}");
}, success: function(data) {
if (data.status == 200) {
window.location.href = data.link;
}

to get a message to display before the Form submits, I added:

$(".loading_msg").show();

into the beforeSend: function, like so:

beforeSend: function() {
 $('#submit-btn').attr('disabled', true);
 $('#submit-btn').val("{{LANG please_wait}}");
$(".loading_msg").show();
return false;

Had to add return:false because after 'show' it was submitting too fast to read the message.
My code stops the submission, so the message can be read. How can the submission then be un-stopped upon the reader closing the message?

I have this:

<div class="loading_msg" style="display:none"> MESSAGE!! <span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span> </div>

and this:

$('#submit-btn').attr('disabled', true);
 $('#submit-btn').val("{{LANG please_wait}}");
$(".loading_msg").show();
return false;

Tried these without success:

 $('#upload-form form').ajaxForm({
      url: '......,
      beforeSend: function() {
         $('#submit-btn').attr('disabled', true);
         $('#submit-btn').val("{{LANG please_wait}}");
    $('.loading_msg').show()
   $('.loading_msg').click(function () {
    return true
});

and this:

 $('#upload-form form').ajaxForm({
      url: '........,
      beforeSend: function() {
         $('#submit-btn').attr('disabled', true);
         $('#submit-btn').val("{{LANG please_wait}}");
$('#submit-btn').click(function (event) {
  event.preventDefault()
  $('.loading_msg').show()
})

$('.loading_msg').click(function () {
  $('#upload-form form').submit()
})

any help is appreciated to show the message and allow the reader of the message to close it which will cause the form to submit.

ChrisJ 15 Newbie Poster

Thank you. for your message. I think that might have been the wrong approach.
I am now at this point.... I'm trying to get help with closing message box and submiting:

I'm trying to add something to this JS, for a successfully working submit Form:

  $('#upload-form form').ajaxForm({
url: '{{LINK aj/ffmpeg-submit}}?hash=' + $('.main_session').val(),
beforeSend: function() {
$('#submit-btn').attr('disabled', true);
$('#submit-btn').val("{{LANG please_wait}}");
}, success: function(data) {
if (data.status == 200) {
window.location.href = data.link;
}

to get a message to display before the Form submits, I added this (this message is not a confirmation, it is an informational message):

$(".loading_msg").show();

into the beforeSend: function, like so:

  beforeSend: function() {
 $('#submit-btn').attr('disabled', true);
 $('#submit-btn').val("{{LANG please_wait}}");
$(".loading_msg").show();
return false;

Had to add return:false because after 'show' it was submitting too fast to read the message.
My code stops the submission, so the message can be read. How can the submission then be un-stopped upon the reader closing the message?
I have this:

<div class="loading_msg" style="display:none"> MESSAGE!! <span class="closebtn" onclick="this.parentElement.style.display='none';">&times;</span> </div>

and this:

$('#submit-btn').attr('disabled', true);
 $('#submit-btn').val("{{LANG please_wait}}");
$(".loading_msg").show();
return false;

Tried these without success:

$(".loading_msg").show();
return false;
$(".loading_msg").click(function () {
return true;
});

AND

$(".loading_msg").show();
e.preventDefault();
$(".loading_msg").click(function () {
$(this).trigger('submit-btn');
});

I look forward to any guidance to have the form submit upon closing the message box.

ChrisJ 15 Newbie Poster

This php statement works successfully:

 if (empty($error) && $_POST['set_p_v'] == 0 && $wallet >=1) {
  //echo '<script type="text/javascript"> $("#myModal").modal("show")</script>';
$db->rawQuery("UPDATE ".T_USERS." SET `wallet` = `wallet` - 0.50 WHERE $wallet = $user->wallet");
}

as you can see I tried to echo a modal when conditions were met, but no success. No echo, but the Form, that the modal html is within, displays and ‘undefined’ form alert, upon submit (I put the JS at the bottom of the html file).

So, then I commented out the echo, as you can see. And tried sweet alert, like so, within the html form page:

$(document).ready(function(){
    $("upload-form").on('#submit-btn',function(e){
    $(".set_p_v").each(function() {

        e.preventDefault();
        var input = $(this);

        if(input.val() == "0"){
            swal(input.attr("0") + "wallet >=1");
          return false;
        }

        swal("some more info")
      })
    });
});





<script src="sweetalert2.min.js"></script>
<link rel="stylesheet" href="sweetalert2.min.css">

without success. Success would be upon 0 entered into the form field (and wallet >1), then submit is selected and upon submit selected then the alert message displays.

Any guidance is appreciated

ChrisJ 15 Newbie Poster

Thanks for that great help.
Using your example, I'm trying another one:

    $wallet = $user->wallet;

        if ($sell_video == 0 && $wallet >= 1) {
        $db->rawQuery("UPDATE ".T_USERS." SET `wallet` = `wallet` - '0.5' WHERE `id` = '".$video->user_id."'");
}

but no success. Success would be (upon a transaction) when sell_video is 0 and the wallet is >= 1 then deduct 0.5 from the wallet.

Any guidance with this is greatly appreciated.

ChrisJ 15 Newbie Poster

This works successfully:

$wallet = $user->wallet;
$upwallet = ($sell_video == 0 && $wallet >= 1 ? 0.5 : 0);    
$db->rawQuery("UPDATE ".T_USERS." SET `wallet` = `wallet`- '".$upwallet."' WHERE `id` = '".$video->user_id."'");

(when the sell_video amount is 0 and the wallet amount >= 1, deduct 0.5 from the wallet). Works successfully.

I'd like guidance to add:
When the sell_video amount is 0 and the wallet amount = 0.5, change/update the sell_video to X.

I tried this, without any successful sell_video change:

if($sell_video === 0 && $wallet === 0.5) {
$sell_video = '1';
}

I'm guessing that 'sell_video' has to be updated in the db. Any example of what that might look like is appreciated.

Any assistance is welcomed.

ChrisJ 15 Newbie Poster

Thanks for your reply.
I posted both places, because I may not get an answer here and may get an answer there, or visa versa.
I may get a partial answer on one or the other, or there may not be a duplicate answer at all.
Yes, I've since edited the posting.
Also, in regard to your partial reply "about the tags. As such you must decide to do that or not", thanks for that, however, I look forward to the possibility of additional opinions on that... as well as anwers to my other questions

ChrisJ 15 Newbie Poster

Yes, I posted there too. I don't understand why you've posted that link

ChrisJ 15 Newbie Poster

Is there any point to putting hashtags in your Instagram profile bio? Will those be found in a search?

Can a posting's caption & info be edited after posting?

Also, I have a domain name, and I have that domain name as my IG username, but someone else has an account name with my domain name, for example, like so: #mydomainname can we both have #mydomainname or am I going to be stuck with just mydomainname (without the #)? Will it make that much difference when people are searching?

If I have the IG account just to give my web site some visibility, how would following others help with that?

ChrisJ 15 Newbie Poster

How to filter YouTube search results for just USA?

Google search of that question shows:
Settings > General > Location > Select your country,

but I've done that and still searching a word or phrase on YT doesn't get me just USA results only.

Any ideas regarding how to do this?

ChrisJ 15 Newbie Poster

Can you please tell me what these lines of code do?

$sub_category = 0;
            if (!empty($_POST['sub_category_id'])) {
                $is_found = $db->where('type',PT_Secure($_POST['category_id']))->where('lang_key',PT_Secure($_POST['sub_category_id']))->getValue(T_LANGS,'COUNT(*)');
                if ($is_found > 0) {
                    $sub_category = PT_Secure($_POST['sub_category_id']);
                }
            }

I look forward to any assistance

ChrisJ 15 Newbie Poster

I'm trying to modify a web script.
Currently, upon uploading a video, in the upload Form, among other things, the uploader chooses a sub-category and enters tags
and then submits/uploads. I'd like the sub-category that is selected, to also be searchable as a keyword.

Presently, the 'videos' table has a 'sub-category' column, but only the 'sub_category' ID is stored there (upon a video being uploaded), not the actual searchable name of the 'sub_category'. (All of the sub-category names and related sub_category ID's are stored in another table).

I'd like to modify the script code so that when the sub_category ID gets stored in the VIDEOS table, the corresponding sub_category name also populates in that table, upon a video being uploaded (so that I can add the 'sub_category' name as a searchable keyword).

I believe this code from the script's submit.php file is where the VIDEOS table gets populated (in the data_insert = array):

if (!empty($_POST['category_id'])) {
                if (in_array($_POST['category_id'], array_keys(get_object_vars($pt->categories)))) {
                    $category_id = PT_Secure($_POST['category_id']);
                }
            }
            $video_privacy = 0;
            if (!empty($_POST['privacy'])) {
                if (in_array($_POST['privacy'], array(0, 1, 2))) {
                    $video_privacy = PT_Secure($_POST['privacy']);
                }
            }
            $age_restriction = 1;
            if (!empty($_POST['age_restriction'])) {
                if (in_array($_POST['age_restriction'], array(1, 2))) {
                    $age_restriction = PT_Secure($_POST['age_restriction']);
                }
            }
            $sub_category = 0;

            if (!empty($_POST['sub_category_id'])) {
                $is_found = $db->where('type',PT_Secure($_POST['category_id']))->where('lang_key',PT_Secure($_POST['sub_category_id']))->getValue(T_LANGS,'COUNT(*)');
                if ($is_found > 0) {
                    $sub_category = PT_Secure($_POST['sub_category_id']);
                }
            }

            $publication_date = 0;
            if (!empty($_POST['date']) && !empty($_POST['hour'])) {
                $publication_date = strtotime($_POST['date']." ".$pt->config->hours[$_POST['hour']]);
                $video_privacy = 1;
            }
            $data_insert = array(
                'video_id' => $video_id,
                'user_id' => $user->id,
                'title' => PT_Secure($_POST['title']),
                'description' => PT_Secure($_POST['description']),
                'tags' => …
ChrisJ 15 Newbie Poster

I’m trying to modify a web script where a drop-down works successfully. How can another drop-down field appear only after a selection has been made from the first drop-down list? Here’s the current code:

<?php if ($pt->page == 'category' && $pt->show_sub == true) { ?>
<div class="pull-right col-md-3 no-padding-left">
<select name="type" class="form-control form-group" id="sub_categories_">
<?php echo $pt->sub_categories_array["'".$_GET['id']."'"]; ?>
</select>
<div class="pull-right col-md-2 col-sm-2 text-right"><h5>{{LANG sub_category}}</h5></div>

and this:

$(document).on('change', '#category_id', function(event) {   
event.preventDefault();   
id = $(this).val();   
$('#sub_category_id').html(sub_categories_array["'"+id+"'"]);
});
$(document).on('change','#sub_categories_', function(event) {   
window.location.href = site_url+'/videos/category/<?php echo($_GET['id']) ?>/'+$('#sub_categories_').val();
});

any guidance is appreciated

ChrisJ 15 Newbie Poster

I am trying to display something on web pages that show this in the url: "sub" for example: ...com/videos/category/1/sub536. It was suggested I try this code:

$page = basename($_SERVER['PHP_SELF']); 
if ($page=="....") {
echo Hello World; 
} elseif ($page=="....php") {
Some Other code... 
}

but I don't know where to place the url in that code to make it purposeful.
Also, I'm not sure that I need if/else, just would like if: /videos/category/1/sub__ then show echo

Well, when I put that code on the page, as-is, I see "page isn't working.

Any guidance/suggestion is appreciated

ChrisJ 15 Newbie Poster

thanks for your reply, but not very helpful

ChrisJ 15 Newbie Poster

This php has subcategory code on line 149 and 215

https://pastebin.com/zgbELKJf

can you tell me if this file outputs a subcategory page?

ChrisJ 15 Newbie Poster

This code below works successfully to capture/record/play video - after camera access permission is granted - when the start button is selected. I'm trying to add the functionality where (after camera access is allowed) the camera view appears, without recording starting automatically (And have the camera view displayed while recording).

Currently, the screen is black after camera access and while capture/recording. I was told that I need to "capture the stream from the video element and put it through the MediaRecorder object". I don't know how to do that. Any help is appreciated

var video = document.querySelector("video");
let params = { audio: true, video: { facingMode: { exact: "environment" } } };

let blobs = [];
let stream, mediaRecorder, blob;

async function startRecording() {
  stream = await navigator.mediaDevices.getUserMedia({
    audio: true,
    video: true,
  });

  mediaRecorder = new MediaRecorder(stream);
  mediaRecorder.ondataavailable = (event) => {
    // Let's append blobs for now, we could also upload them to the network.
    if (event.data) {
      blobs.push(event.data);
ChrisJ 15 Newbie Poster

This html web page code, when viewed via mobile device, captures video from the mobile device. By tapping the page, the mobile video full screen appears, ready to begin recording. I'd like to find a way to reduce the dimensions of that full screen, if possible. I'm guessing it might need height and width dimnsions via some javascript code referencing "fileToUpload"?

<form action="uploadMobile.php"  method="post" enctype="multipart/form-data">
<input type="file" name="fileToUpload" id="fileToUpload" accept="video/*" capture="user" onchange="submitForm();">
<input type="submit" value="Upload" name="submit" id="go" style="display: none;"/>
</form>

Any guidance/assistance is appreciated.

ChrisJ 15 Newbie Poster

Thank you for your reply and for "dug a little deeper", much appreciated, I did see the quote from the link "and they are back in the website".
However, this link does that same thing. If you view this link (I shortened it, it was quite long) , via mobile device, and choose 'record from camera'
you will see a countdown overlay, 5 4 3 2 1.
I would be interested to know how that overlay is accomplished being that this link is via a web .com page:
https://bit.ly/33D2A6f

I look forward to any additional guidance.

ChrisJ 15 Newbie Poster

Regarding: "viewing is playback of a video", this is not about viewing or playback, it is scrolling text when "recording"

rproffitt commented: Still looks like you can overlay with the method noted. +15
ChrisJ 15 Newbie Poster

Thanks for the replies, but I'm not clear if anyone has looked at my link example (via mobile device viewing).
I think viewing there and proceeding, would help clarify my request.
Also, this is not about 'playback'.

ChrisJ 15 Newbie Poster

Thanks again for your reply.
Regarding "I don't understand what you want entirely", to be understood I put a link on my reply to show exactly what I mean. To get a better understanding all that is needed is to view this page, via a mobile device,: https://mobileview.tiiny.site/ and "tap" the page, I believe it may give a better idea of what I mean.

Thanks again.

ChrisJ 15 Newbie Poster

Hi, thank you for your kind reply. I believe your suggestion is for a web page video. My needs is on a web page, that gets tapped via mobile view and shows a camera app. I have a sample at https://mobileview.tiiny.site/ to be viewed via mobile device.

I tried to integrate my code with your suggested code with no success. Any additional help is appreciated.

Also, I don't know what you're trying to tell me here: "Remember this forum is mostly programmers and once in a while a person is looking for a no-code solution or for someone to write it for them."

I am looking for programmer help, aren't I?

I look forward to any helpful reply. Much thanks again.

ChrisJ 15 Newbie Poster

Thanks you for your reply.
I have created a link to the page that I'm asking about. Apparently it expires in 6 days. I've never used this temporary file hosting site/service before (tiiny.site), but it looks like it works currently. The html page I'm asking about is at : https://mobileview.tiiny.site/
I look forward to any additional comments/suggestions/guidance.

ChrisJ 15 Newbie Poster

Is it possible to add scrolling text across the page/video-camera-screen?

On an html page, it uses this code:

accept="video/*"

in this context:

<input type="file" name="fileToUpload" id="fileToUpload" accept="video/*" capture="user" onchange="submitForm();">

and when you view the page via mobile, and tap the page, your video camera screen appears. I'm looking to see if it's possible to add scrolling text across the page/video-camera-screen ? like some type of overlay? I would image it may be possible on an html page that displays a web cam, with something like this:

<video autoplay="true" id="videoElement"></video>

I look forward to any comments/suggestions/guidance.

ChrisJ 15 Newbie Poster

I am trying to modify a existing web script's Upload Form where, currently you choose a Category...etc. and Submit. When a Category is chosen, I'd like another dropdown list of choices to display. Here is the code currently:

<div class="form-group">
<label class="col-md-12" for="category_id">{{LANG category}}</label>
<div class="col-md-12">
<select name="category_id" id="category_id" class="form-control">
<?php foreach($pt->categories as $key => $category) {?>
<option value="<?php echo $key?>"><?php echo $category?></option>
<?php } ?>
</select>
</div>
</div>

Any guidance/assistance with this appreciated.

ChrisJ 15 Newbie Poster

I am trying to display some text "THIS IS A TEST" on the html page.

I am getting this error:

"Notice: Undefined variable: text1 in /home/public_html/themes/videos/content.html on line 23"

Here is the php file ( I added line 35 and 39):

<?php

declare( strict_types=1);
// these should be set in PHP.ini
error_reporting(-1); // set maximum errors
ini_set('display_errors' , 'true');

if (empty($_GET['page'])) {
    header("Location: " . PT_Link('404'));
    exit();
}
$page         = PT_Secure($_GET['page']);
$limit        = 20;
$pt->rss_feed = false;
$pt->exp_feed = true;
$pages        = array(
    'trending',
    'category',
    'latest',
    'top'
);

if (!in_array($page, $pages)) {
    header("Location: " . PT_Link('404'));
    exit();
}

if (!empty($_GET['feed']) && $_GET['feed'] == 'rss') {
    $limit        = 50;
    $pt->rss_feed = true;

}

$text1 = 'THIS IS A TEST';
$cateogry_id = '';
$videos = array();
if ($page == 'trending') {
$text1 = 'trending';
    $title  = $lang->trending;
    $db->where('privacy', 0);
    $videos = $db->where('time', time() - 172800, '>')->orderBy('views', 'DESC')->get(T_VIDEOS, $limit);
}

else if ($page == 'latest') {
    $title  = $lang->latest_videos;
    $db->where('privacy', 0);
    $videos = $db->orderBy('id', 'DESC')->get(T_VIDEOS, $limit);
}

else if ($page == 'top') {
    $title  = $lang->top_videos;
    $db->where('privacy', 0);
    $videos = $db->orderBy('views', 'DESC')->get(T_VIDEOS, $limit);
}

else if ($page == 'category') {
    if (!empty($_GET['id'])) {
        if (in_array($_GET['id'], array_keys($categories))) {
            $cateogry = PT_Secure($_GET['id']);
            $title    = $categories[$cateogry];
            $cateogry_id = "data-category='$cateogry'";
            $db->where('privacy', 0);
            $videos   = $db->where('category_id', $cateogry)->orderBy('id', 'DESC')->get(T_VIDEOS, $limit);
        } else {
            header("Location: " . PT_Link('404'));
            exit();
        }
    }
}

use Bhaktaraz\RSSGenerator\Item;
use Bhaktaraz\RSSGenerator\Feed;
use Bhaktaraz\RSSGenerator\Channel;

//Export rss feed
if ($pt->rss_feed) {
    $rss_feed_xml   = "";
    $fl_rss_feed    = new Feed();
    $fl_rss_channel = new Channel();

$fl_rss_channel
    ->title($pt->config->title)
    ->description($pt->config->description)
    ->url($pt->config->site_url)
    ->appendTo($fl_rss_feed); …
ChrisJ 15 Newbie Poster

I am using a php web video script which allows Users to purchase videos successfully. The purchases are made from the amount available in the Users’ 'wallet' (the User can also earn compensation, which gets added to his earnings 'balance').

When there’s not enough available in the 'wallet' for the purchase, the script checks and displays a message 'not enough money'.

I’ve added the ability where the script first checks the 'wallet' amount, and if empty will then check the earnings 'balance', and use amount from the earnings 'balance', for the purchase, and if neither has enough, then the “not enough money” message appears.

However, if the minimum cost of a purchase is '2' and the 'wallet' has '1' left over, it will never get used.
So, I'm trying to code it so, after checking , the 'wallet', and finds it doesn't have enough, it will combine the 'wallet' with the earnings 'balance', to check if there is enough. If enough > purchase. If not enough show "not enough money". But this code keeps showing 'not enough money' message, even though the 'wallet' has '4', and the earnings 'balance' has '4', and the purchase amount is '6'. I was hoping the code would combine 4 + 4 = 8 and then deduct the 6 (purchase amount).

Can you please look at my code and tell me what might be incorrect? Or suggest something that will work?

    if($wallet >= $amount){

                    $wallet = (string)($wallet - $amount);
                    $db->where('id', …
ChrisJ 15 Newbie Poster

I have this Form that works successfully (I know it's not state-of-the-art).
I simply want to add code to make Contact Name field mandatory. Can you help me?
I don't know how much code I should post. Here's some:

<script type="text/javascript">
function checkemail(){
var str=document.myform.email_address.value;
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
if (filter.test(str))
testresults=true;
else {
alert("Please input a valid email address!");
return false;
}
if(document.myform.agree.checked!=1) {
alert("Please check the box to agree to the Terms.");
return false;
}
if(document.myform.ans.value.toLowerCase()!="white") {
alert("Please answer security question correctly: Black or White?");
return false;
}
return true;
}
</script>
ChrisJ 15 Newbie Poster

To deploy an application in red5 webapps directory, is that something that can be explained in a forum posting? Or would I need to hire a consultant for that?
Thanks

ChrisJ 15 Newbie Poster

To deploy an application in red5 webapps directory, is that something that can be explained in a forum posting? Or would I need to hire a consultant for that?
Thanks

ChrisJ 15 Newbie Poster

Thanks for looking here.

I'd like to move the list of thumbnails that appears on the serch page of this php script (see attached).

They appear on the left side of the right column. I'd like them to appear on the right side of the right columns and was told to tweak the serch results part of the page and the css. So i thought I'd start with the search results code. Can you help me determine which part of this code I could change to accomplish this? Thanks. Any help will be appreciated.

<!--Begin Left Column-->
<div id="column-left-2">
<br />
   <!--Begin Popular Tag Cloud populate from search type ??-->
   <div class="header-narrow"><h3>[var.lang_Tags_most_popular]</h3></div>
   <div class="whats-showing"><!--[var.tag_cloud_block;htmlconv=no;comm]--></div>
   <div class="container-narrow-bottom"></div><!--End Popular Tag Cloud-->
   <!--Begin Left Advert-->
   <div class="container-narrow-top"></div>
   <div id="advert-left"><!--[var.ads_left;htmlconv=no;comm]--></div>
   <div class="container-narrow-bottom"></div><!--End Left Advert-->
   <div style="height:120px;">&nbsp;</div>
</div><!--End Left Column-->

<!--Begin Right Column-->
<div id="column-right-2">

  <!--Begin Video Search List-->
  <div style="height: 2px;">&nbsp;</div>

  <span style="margin-bottom: 12px;" class="font5_15">
    "[var.keyword]"&nbsp;&nbsp;[var.get_type_word]&nbsp;[var.lang_search]&nbsp;[var.results_show]&nbsp;-&nbsp;[var.results_of]&nbsp;of&nbsp;[var.total_records]&nbsp;[var.lang_results] <br />You must <a href="login.php">log in</a> to view these video search results.<br /><br />

  </span>

  <div id="content-list">
    <ul class="content-list-thumb">
      <li><a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]"><img src="uploads/thumbs/[blkfeatured.video_id;block=div].jpg" alt="video pic" width="120" height="90" border="0" /></a></li>
    </ul>
    <ul class="content-list-info">
      <li><h4>&nbsp;<!--[var.lang_title]:--><!--<a href="videos/[blkfeatured.indexer;block=div]/[blkfeatured.title_seo;block=div]"><!--[blkfeatured.title;htmlconv=no;block=div;ope=max:70;comm]--></a>--></h4></li>
<li><b><!--[var.lang_description]:-->&nbsp;</b></li>
      <li><!--<span class="font4_12">[var.lang_rating]&nbsp;&nbsp;</span>-->
        <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star1;block=div]" width="18" height="18" alt="1 Star" />-->
        <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star2;block=div]" width="18" height="18" alt="1 Star" />-->
        <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star3;block=div]" width="18" height="18" alt="1 Star" />-->
        <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star4;block=div]" width="18" height="18" alt="1 Star" />-->
        <!--<img border="0" src="themes/[var.user_theme]/images/[blkfeatured.star5;block=div]" width="18" height="18" alt="1 Star" />-->
        &nbsp;&nbsp;&nbsp;
        <!--<span class="font4_12">[var.lang_views]:&nbsp;</span>--><!--(<!--[blkfeatured.number_of_views;block=div;comm]-->)-->
        &nbsp;&nbsp;&nbsp;
        <!--<span class="font4_12">[var.lang_duration]:&nbsp;</span>--><!--(<!--[blkfeatured.video_length;block=div;ope=max:45;comm]-->)-->
        &nbsp;&nbsp;&nbsp;
       <!--<span class="font4_12">[var.lang_uploaded]:&nbsp;</span>-->
      </li>
      <li><!--<span class="font4_12">[var.lang_tags]:&nbsp;</span>--></li>
      <!--<li><b>[var.lang_comments] - [var.lang_responses]:&nbsp;</b>(<!--[blkfeatured.comments;block=div;ope=max:80;comm]-->)</li>-->
    </ul>
    [onload;block=div;when [var.type_videos]=1;]
  </div>
  <!--End …
ChrisJ 15 Newbie Poster

Thanks for your reply. i believe this is the code you requested:

<?php
error_reporting (0);

// License: You are not to sell or distribute this software without permission       //
// Help and support please visit http://www.phpmotion.com                            //
// Copyright reserved                                                                //
///////////////////////////////////////////////////////////////////////////////////////

include_once ('classes/config.php');
include_once ('includes/reserved_names.php');

// define access for loading non display php files
define('access',true);

$ahah			= 1;
$show_register	= '';
$load_ajax		= '';
$form_submitted	= '';
$action		= '';
$new_user_name	= '';
$account_type 	= '';
$first_name		= '';
$last_name 		= '';
$email_address 	= '';
$email_address2 = '';
$user_name 		= '';
$password 		= '';
$confirm_password = '';
$country_list	= '';
$dob_month		= '';
$dob_day		= '';
$dob_year		= '';
$zip_code		= '';
$birthday		= '';
$error_message 	= '';
$checked 		= '';

$show_register	= 1;
$load_ajax		= 1;
$procede 		= true;
$action		= mysql_real_escape_string( $_GET['action'] );
$new_user_name	= mysql_real_escape_string( $_GET['new_user_name'] );
$site_name 		= mysql_real_escape_string($config['site_name']);
$form_submitted	= mysql_real_escape_string( $_POST['form_submitted'] );

if ( $action == 'check_user' ) {
	$new_user_name	= trim(strtolower($new_user_name));
	if ( $new_user_name == '' ) {
		echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['fill_all_fields']."</b></font>";
		die();
	}
	if ( strlen($new_user_name) < 4 ) {
		echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_4_chars']."</b></font>";
		die();
	}

	// check against reserved names e.g. -> admin etc... or adult words ban
	if ( in_array( $new_user_name, $reserved_names ) ) {
		echo "<font color=\"#EE0000\" size=\"2\"><b>".$config['username_not_allowed'] ."";
		die();
	}

	$sql		= "SELECT user_name FROM member_profile WHERE user_name = '$new_user_name'";
	$query	= @mysql_query($sql);
	$count	= @mysql_num_rows($query);

	if ( $count > 0 ) {
		echo "<font size=\"2\"><b>$new_user_name</b></font><font color=\"#EE0000\" size=\"2\">&nbsp;<b>=> $lang_not_available</b></font>";
	} else {
		echo "<font size=\"2\"><b>$new_user_name</b></font><font …
ChrisJ 15 Newbie Poster

In a php script I'm using the Registration page only had fields for name and email address, basically. I added fields, just by copying the code on the page. I added Address1, Address2, City and State. Then I added those fields to the mysql db.

However, I need help with two things, when I Submit, and some field happens to be incomplete an error message appears and asks the user to complete. All fields remain filled, except the ones I added. How to I keep my just-added-fields populated, like the rest of the fields?

And secondly, when I tested my additions, by registering, my newly added fields info, didn't get added to the db.

Your help will be appreciated.

<div class="signup-right">
    <h1 style="border-bottom: 1px solid #666666;">[var.lang_register_today]!</h1>
    <form action="join.php" method="post" name="capform" class="FormGeneric" onSubmit="return capCheck(this);">
    <div>
      <div style="margin-left:52px; float:left;">
        <b>[var.lang_first_name]:</b>
      </div>
      <div style="margin-right:50px; float:right;">
        <input type="text" name="first_name" size="20" value="[var.first_name]" />
      </div>
    </div>
    <br />
    <br />

    <div>
      <div style="margin-left:52px; float:left;">
       <b>[var.lang_last_name]:</b>
      </div>
      <div style="margin-right:50px; float:right;">
        <input type="text" name="last_name" size="20" value="[var.last_name]" />
      </div>
    </div>
    <br />
    <br />
<div>
      <div style="margin-left:52px; float:left;">
        <b>Address 1:</b>
      </div>
      <div style="margin-right:50px; float:right;">
        <input type="text" name="address_1" size="26" value="[var.Address_1]" />
      </div>
    </div>
    <br />
    <br />
    <div>
	      <div style="margin-left:52px; float:left;">
	        <b>Address 2:</b>
	      </div>
	      <div style="margin-right:50px; float:right;">
	        <input type="text" name="address_2" size="26" value="[var.Address_2]" />
	      </div>
	    </div>
	    <br />
    <br />

        <div>
		      <div style="margin-left:52px; float:left;">
		        <b>City:</b>
		      </div>
		      <div style="margin-right:50px; float:right;">
		        <input type="text" name="city" size="26" value="[var.city]" />
		      </div>
		    </div>
		    <br />
    <br />


            <div>
			      <div style="margin-left:52px; float:left;">
			        <b>State/Province:</b>
			      </div>
			      <div …
ChrisJ 15 Newbie Poster

Greybox, the pop-up window: http://orangoo.com/labs/GreyBox/

I'd just like to know how I can get it to pop-up not in the center of the page.
I'd like it to pop-up on the left side of the page.
Is that possible? If so can you help me accomplish this?
It's ben suggested to change the CSS styles, but I and others haven't succeeded there. It may need additional code.
Any help would be appreciated. Thanks.

ChrisJ 15 Newbie Poster

Thanks for that link. It shows this:

GB_showCenter
Signature:

GB_showCenter(caption, url, /* optional */ height, width, callback_fn)

Example:

<a href="http://google.com/" onclick="return GB_showCenter('Google', this.href)">Visit Google</a>

I just don't know where to place this code example. In the CSS file?

Any additional help will be appreciated.

Also, fyi, upon linking from Greybox to their Google group it shows:,
"the group named greybox has been removed because it violated Google's Terms Of Service".

ChrisJ 15 Newbie Poster

When I download a gif from my website script, it appears like a thin line. I expected to see the 1" by 1" graphic solid color image that appeared on the site. Is it just a thin line that expands once the web page size is set? How does this work?

ChrisJ 15 Newbie Poster

Can Crystal Reports be used with MySQL?
If not, what reporting tool do you recommend?

ChrisJ 15 Newbie Poster

If you're familiar with Greybox, the pop-up window: http://orangoo.com/labs/GreyBox/

I'd just like to know how I can get it to pop-up not in the center of the page.

I'd like it to pop-up on the left side of the page.
Is that possible? If so can you help me accomplish this?

Thanks.

ChrisJ 15 Newbie Poster

Can you tell me which part of this code is the Input Box(browse box field) and the Submit Button, please?

Thank you.

<%@ Language=VBScript %>
<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
%>
<!-- #include file="aspupload.asp" -->
<%

' ****************************************************
  Dim uploadsDirVar
  uploadsDirVar = "C:/Documents and Settings/TAinput/"
' ****************************************************
function OutputForm()
%>
    <form name="frmSend" method="POST" enctype="multipart/form-data" action="uploadTester.asp" onSubmit="return onSubmitForm();">
 <B>File names:</B><br>
    File 1: <input name="attach1" type="file" size=35><br>
    File 2: <input name="attach2" type="file" size=35><br>
    File 3: <input name="attach3" type="file" size=35><br>
    File 4: <input name="attach4" type="file" size=35><br>
    <br>
 <!-- These input elements are obviously optional and just included here for demonstration purposes -->
 <B>Additional fields (demo):</B><br>
 Enter a number: <input type="text" name="enter_a_number"><br>
    Checkbox values: <input type="checkbox" value="1" name="checkbox_values">-1 <input type="checkbox" value="2" name="checkbox_values">-2<br>
 <!-- End of additional elements -->
    <input style="margin-top:4" type=submit value="Upload">
    </form>
<%
end function
function TestEnvironment()
    Dim fso, fileName, testFile, streamTest
    TestEnvironment = ""
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    if not fso.FolderExists(uploadsDirVar) then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not exist.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
        exit function
    end if
    fileName = uploadsDirVar & "\test.txt"
    on error resume next
    Set testFile = fso.CreateTextFile(fileName, true)
    If Err.Number<>0 then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not have write permissions.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with …
ChrisJ 15 Newbie Poster

I'm using FreeASPupload script and it works successfully.
I'd like to get some guidance on how to modify to add a second Browse Box and second Submit Button, so these uploaded files can go to a second directory destination. Thanks.

I believe this is the script page (of two) that would need the modification:

<%@ Language=VBScript %>
<%
option explicit
Response.Expires = -1
Server.ScriptTimeout = 600
%>
<!-- #include file="aspupload.asp" -->
<%

' ****************************************************
  Dim uploadsDirVar
  uploadsDirVar = "C:/Folder_1/"
' ****************************************************
function OutputForm()
%>
    <form name="frmSend" method="POST" enctype="multipart/form-data" action="uploadTester.asp" onSubmit="return onSubmitForm();">
 <B>File names:</B><br>
    File 1: <input name="attach1" type="file" size=35><br>
    File 2: <input name="attach2" type="file" size=35><br>
    File 3: <input name="attach3" type="file" size=35><br>
    File 4: <input name="attach4" type="file" size=35><br>
    <br>
 <!-- These input elements are obviously optional and just included here for demonstration purposes -->
 <B>Additional fields (demo):</B><br>
 Enter a number: <input type="text" name="enter_a_number"><br>
    Checkbox values: <input type="checkbox" value="1" name="checkbox_values">-1 <input type="checkbox" value="2" name="checkbox_values">-2<br>
 <!-- End of additional elements -->
    <input style="margin-top:4" type=submit value="Upload">
    </form>
<%
end function
function TestEnvironment()
    Dim fso, fileName, testFile, streamTest
    TestEnvironment = ""
    Set fso = Server.CreateObject("Scripting.FileSystemObject")
    if not fso.FolderExists(uploadsDirVar) then
        TestEnvironment = "<B>Folder " & uploadsDirVar & " does not exist.</B><br>The value of your uploadsDirVar is incorrect. Open uploadTester.asp in an editor and change the value of uploadsDirVar to the pathname of a directory with write permissions."
        exit function
    end if
    fileName = uploadsDirVar & "\test.txt"
    on error resume next
    Set testFile = fso.CreateTextFile(fileName, true)
    If Err.Number<>0 then
        TestEnvironment = "<B>Folder " & uploadsDirVar …
ChrisJ 15 Newbie Poster

I have tried to modify the PHP in an OSCommerce file, while trying to get my OSCommerce site up. I have apparently created the following Parse error: ....... /create_account_success.php on line 16. I am not a programmer and no very little PHP. Is it acceptable to paste the PHP here and ask how can I restore this to a readable format? This is the entire code. The errored code is the following:
<?php
/*
$Id: create_account_success.php,v 1.9 2002/11/19 01:48:08 dgw_ Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2002 osCommerce

Released under the GNU General Public License
*/

define('NAVBAR_TITLE_1', 'Create an Account');
define('NAVBAR_TITLE_2', 'Success');
define('HEADING_TITLE', 'Your Account Has Been Created!');
define('TEXT_ACCOUNT_CREATED', 'Congratulations! Your new account has been successfully created! Please allow 24 hours for Account Activation. <small><b></b></small> <a href="'. tep_href_link(FILENAME_CONTACT_US) '"></a>.<br><br>A confirmation will be sent to the provided email address. If you have not received it within 24 hours, please <a href="' . tep_href_link(FILENAME_CONTACT_US) . '">contact us </a>.');
?>

Can someone please help me correct, whatever is in error? Thank you.