Mr.M 89 Future Programmers

I've personally used it, I would accee internet without me having active data bundles loaded or so, but one thing is that you have to open your mobile data connection for it to work but your account can be 0.00 both data and airtime but still it connects.

Mr.M 89 Future Programmers

I was referring to that free internet VPN (Tunnels) like Ha Tunnel and others. Basically these kind of Apps allow you to access internet even if you don't have data at all as well as airtime. You are able to surf internet as if you have data, watch videos, stream, it's like you have an unlimited internet access for free.

So that what I was asking as to how does it work, there's a project that I'm working on and if I can be able to also understand the working of the VPN that will help a lot in this project.

Mr.M 89 Future Programmers

I think you need BRIWPED. It allows you to share tabs with any supported browsers. It support Firefox and all Chromium browsers.

With it you also don't have to consume too much of your memory when you are busy online by having too many tabs opened, you can simply share the tab for later use and close the tab to free memory.

Mr.M 89 Future Programmers

Oh, wait, there's the magic word or phrase: "VPN PROVIDER." Not only must the data flow over some network (cellular/mobile/WiFi/Bluetooth) there must be some VPN SERVER out there that is reachable. Some VPN SERVERS are not. Example: Some in China, Iran, etc.

Yes I'm totally aware of this, I think my question is on how does it proceed transmitting the network packets to the VPN Server and vise verse where as the middle man (Cellular network operator) has terminated your connection to the internet. How does data continue to the VPN Server and also transmitted from VPN Server to this client cause that should be blocked since I don't have data.

I saw a lot of confusing VPN technologies that are used like IPSec, and others. This end up confusing because what I've seen is that this thing is divided, there's VPN and there's Tunneling, but they use both. For Ha Tunnel it sais it uses SSH2.0 and P2P and when it connect I think it check the connection with www.sshserver.com:22 and create a local host I think this is for communicating with the Tunnel server but the Forward DNS is alway No which means it doesn't forward.

I once saw can't recall weather it was a video or aticle that says for this to work you need to confuse the SSL by scrambling data and forward it to your wrong (correc) VPN server so it will try to correct this but by doing so trying to correct …

Mr.M 89 Future Programmers

Hi DW.

I'm a bit confused and lost on how this App is working called Ha Tunnel Plus (You can check it on Playstore, and have a look on YouTube for the configuration file). Basically it somehow uses the internet connection of the server, it tunnels it to your Android device and you can be connected to the internet without having data on your mobile network sim card, but you can use internet just like you would normally do except that this is not limited on how much data you as a user is using.

I tried playing around with the bunch of source codes I found on github but they don't connect, so since I was trying to connect using on of the IP address that worked on Ha Tunnel Plus, I thought it would also work in my App but it didin't, and I thing that .hat configuration file is the certificate because I found some encrypted data but it just text.

In my case I want to be able to limit this internet access only to my App, also be able to dynamically change this so the entire phone can use it. I don't want a user to select the countries nor see it rather randomly do that at the background, but first thing first. for this kind is it reversing internet connetion or what? How does this work exactly because others I saw they work only if you have data otherwise it doesn't connect. Another that …

Mr.M 89 Future Programmers

Hi DW.

Anyone knows how I can get the device name the browser is running on? I mean something like on the attached image with Javascript?

FireFox_SendTo.PNG

Mr.M 89 Future Programmers

You have two operations depending on you start app approach. I mean if you always require login each time an App is started.

In that case when the user attempt to login simply return the account status in whatever way you want so that you can check the value and see if the account is active or not.

Another method is to request an account status feom your database to see if the account is active or not.

Mr.M 89 Future Programmers

Thanks it works.

Mr.M 89 Future Programmers

Ow thanks James I will look at it tonight. I'm using 32bit.

Mr.M 89 Future Programmers

I get this error when i try to execute the command line code for jadx.

Mr.M 89 Future Programmers

The 1500 is it a known value or? If it a known value then I would do it the other way around. Which is to divide 1500 but the number or days, let say from the first day it was entered so let say it has to be 1500 in 30 days. So dividing the 1500 by 30 will give you the value to add each day.

Is that approach ok with you?

Mr.M 89 Future Programmers

Where will those div values come from? Will it be known fixed (constant) values or dynamic?

Mr.M 89 Future Programmers

Hi Dw.

I had java 8 installed I'm, the problem is that when I run a bat file that uses the java it says Invalid maximum heap size -Xmx4g. I've even tried to uninstall and reinstall java but the same problem persists.

I've added the Xms as well as Xmx in the environment property window but still the same issue, I've restarted the laptop after every attempt but still.

I've even set it on Java Control Panel as well but still the same issue is raised. Anyone who might know another location as to where is this 4g coming from because I don't recall setting that.

Mr.M 89 Future Programmers

Then you will need to first declare a global variable then within your select statement assign this variable with the selected student name.

Mr.M 89 Future Programmers

Thanks, will give it a short

Mr.M 89 Future Programmers

Hi, I'm curious on how and which tools are used to develop an 8 ball pool game. The one I'm referring to is that you play online with strangers, and friends for coins and tournaments.

Can anyone point me to the right direction. This will be my first attempt in game development, but I'm a full stack developer and a software developer with Java, VB.NET, C++ ( very new)

Mr.M 89 Future Programmers

Well I will say keep programming, I'm a full stack developer, I use different languages but that because I'm not just a web developer but a full software developer.

In my case this is what I do, I work a lot on programming and developing new systems for different platforms with different requirements which end up having to use different languages like if I want to work directly with the OS I mostly use C++ for that because of it flexibility in interception of OS messages, but for other lighter softwares I use VB.NET/Java/ but what nice with Java is that it can do almost all the things you can do with C++ but the problem is the dependencies that you need to work on and or with which end up being a stress of it own but.

In short it helps if you work with different problems to know many languages because some platform's don't support other things which you will require and it also became easy to convert codes/source codes to any language and you fit everywhere.

But PHP, Java, JavaScript, and others I will say it a must to know for the web and mobile App development.

Mr.M 89 Future Programmers

So you want excel to be like your database?

athousandsticks commented: The returned “EmployeeID” will be used to clock in [in the Excel Time & Attendance application] automatically +0
Mr.M 89 Future Programmers

Thanks for all your replies. I personally do have one, it a service that ensures that the users sensitive information is not sent over the internet.

What I mean is that we all know that when a user type let say test123 as password and click the submit button the data is sent as is then the TLS take place to encrypt and decrypt the data.

When the data reach the server the data is decrypted back to it original form which in this case its test123.

When the system process this it encrypt it many people use aes, MD5, but usually it MD5 encryption.

Now let's look at the risks here. You let the user type their private information then on the actual field the data is not protected which means anyone may view it. The data is sent over the internet with the help of TLS, we all depend on it to secure our users data during transportation.

So when TLS has been cracked that means those who cracked it will be able to view and read sent data. So obviously there's no reason for sending such sensitive private user information.

We've seen lot of people complain of being hacked or their accounts be hacked that's why I have developed BRIWPED to solve this problem.

Now this requires all websites that cares for their user privacy to use BRIWPED to protect their accounts. This has two systems, back end and extension. But to address the issue of not …

Mr.M 89 Future Programmers

Visit www.briwped.com to see what I'm talking about. I think there's a very great opportunity for you Dani Queen on this regarding the DaniWeb

Mr.M 89 Future Programmers

Yes it people like you whom I want indeed. To begin, when users login I'm pretty sure that passwords are not saved as is on the database. Correct? So
1) What is the need for sending such sensitive users information over the internet?
2) We saw new system being developed such as those smart key holders that take your passwords with you and also very notable the LockWise from Mozilla which to me and also as you may know or can check it out you will see that it saves and also uses the users password as is in a plain text with no security added or anything.

Don't you also think it time we change this and make it more secure and a users password be an actual PASS Word meaning it serve the whole purpose of it invention which is to be secret, and it a word you need to key it right to be able to go through?

Mr.M 89 Future Programmers

Also cheack for BRIWPED and see more

Mr.M 89 Future Programmers

How many have websites here or own websites here?

Mr.M 89 Future Programmers

Hi DW.

Well I'm very much interested in the data protection and also giving the best privacy to the public where we protect your passwords. I've seen something that Firefox had introduced to their browsers with also their Apps. This is called LockWise which is a tool to sync your passwords with your other devices.

Now as we are in the 4IR I personally think that such information shouldn't be shared purely with other devices because what will happen when you are not in front of those devices?

Worst of them all we all know that browsers don't encrypts the passwords so this to me opens a very huge security loophole because a person with access to let say your computer can see and copy your passwords as the browsers saves the actual passwords.

With that in mind check BRIWPED on YouTube see the demonstration on this live. I think as we are in the 4IR the only person should know the actual password is the owner only. I don't see a reason why would we still submit the actual password over the internet whereas we can only use the encryption systems like BRIWPED to ensure that only the salts is sent and on the server the encryption MD5 or encrypted RSA1 or any encryption is used so that even on the server there will be no actual user password is received but rather the MD5, RSA1 or any other.

This will make it more harder to hack provided that …

Mr.M 89 Future Programmers

I think what's next on this issue or on this kind of hack, I think they will change or advance from sim swop to hacking the actual phones without our knowledge.

Take a look at this, on your mobile you download an App then on the installation process it ask you to grant it permissions to all the technologies it will need or use that also including reading your SMSs, your phone book contacts, and sometimes even your location.

Now to me that's a very dangerous acts just like how WhatsApp does when you installing it, you login, then it sends you an SMS with the OTP, but as soon as that SMS reaches your system tray it reads it and get the code. So for a hacking App I think it can also do the same when they are spying on you for your banking details because as we are in the 4IR we have seen even banks push people to bank digital mostly their mobile Apps.

Now to me that look like the next big hit we should be prepared of as it is coming and it will hit very badly because I'm not yet sure if its possible to get the message on system tray then instantly remove it so it doesn't notify or ring the notification but if that's possible then people might really lose money and don't get notifications on their Apps because these Apps would get it first then remove it so not to …

rproffitt commented: "Get that person an upvote." In reference to the Shareit comment. That's banned on some forums. +15
Mr.M 89 Future Programmers

Yes it did work, now it perform all the posts methods.

Mr.M 89 Future Programmers

Thanks Dani Queen, I've tried your suggestion but the problem persisted finally I just added a function call to the 2nd entry point function to the last inner function that performs the post that I don't care of it response so now it works.

This solution I've figured is not the best as this might not work on the third party sites because it work here because its local and the files are linked but the client might not want to add such. Maybe serializing the button to get the function name might help, I'm not sure.

Some website developers would prefer the form submit action then JS approach to process their logins so I think this will be a problem on such scenarios.

Basically this has to work along with the login process and it has to work first as it did before but with the way I've just done it, I'm not sure if it will work as it should on all the third party websites, but just because it calles the login function at the end it ok so the login process for third party users will be processed it ok but will still look for a more batter way to do this.

Mr.M 89 Future Programmers

Are you using jQuery?
Yes

Are you using the preventDefault() method?
Yes

Let me see your code.
Ok, but the code is a bit complicated, but I will first explain then post the affected code.

I'm not using the submit but the actual button which is calling two functions on the onclick event, the first function before it was simply processing the data which also sometimes takes time but as I've stopped the site from submitting, it waits till the required data is returned which should not take more then 5 seconds else just proceed with login.

Now on this function I've added two more posts in two functions which the first of these functions generate the unique ID then perform a post to check if there is this key on the database or not. The second function is called when the first is done because it depends on it. This then get the UID then forward the FCM to the user.

Ok I see it has already been complicated. Let me do this:

I have 2 functions as the entry point. The first one is what I'm interested more in as it process data and it also has the two posts that I've just mentioned above. The second funtion which is also the entry point is a function that process the login as normal, take data from the form using JS, this function is also on a different file, but the other functions are on the same …

Mr.M 89 Future Programmers

How can I perform both ajax and form post sametime? currently the code only sends one that is called first and dont call the second one

Mr.M 89 Future Programmers

I've managed to figure out what was the problem. The data array didn't have the message so putting the message inside it solved the problem

 data'=>array(
            'action'=>'models',
            'model_id'=>'2701',
 'message'=>'My message here',
               )`
Mr.M 89 Future Programmers

Hi DW.

I'm developing an App that uses the FCM notification, but the problem is that my code doesn't seem to get the actual data like when I extract the message or body it shows just the icon only if the notification was received when the App is open, and it shows the title and body if the notification is received when the App is not running.

Basically what I'm trying is to get the message and put that on a textView so that it is seen on the actual App when you click the notification.

Here is my FirebaseMessagingService code:

public class FirebaseMessagingService extends com.google.firebase.messaging.FirebaseMessagingService {

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage) {
      showNotification(remoteMessage.getData().get("body"));
    }

    private void showNotification(String message) {
        Intent i = new Intent(this,MainActivity.class);
        i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        //if(message != "") {
            //i.putExtra("message",message);
        //}
        PendingIntent pendingIntent = PendingIntent.getActivity(this,0,i,PendingIntent.FLAG_UPDATE_CURRENT);
        NotificationCompat.Builder builder = new NotificationCompat.Builder(this)
                .setAutoCancel(true)
                .setContentTitle(message)
                .setContentText(message)
                .setDefaults(Notification.DEFAULT_SOUND)
                .setStyle(new NotificationCompat.BigTextStyle().bigText(message))
                .setContentText(message).setLights(Color.GREEN, 300, 300)
                .setVibrate(new long[] { 100, 250 })
                // .setSmallIcon(R.drawable.common_google_signin_btn_icon_dark)
                .setSmallIcon(R.drawable.blogo)
                .setContentIntent(pendingIntent);

        NotificationManager manager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);

        manager.notify(0,builder.build());

        //startActivity(i);
    }
}

My MainActivity code:

protected void onCreate(Bundle savedInstanceState)  {
        super.onCreate(savedInstanceState);
        // remove title
       this.requestWindowFeature(Window.FEATURE_NO_TITLE);
       /* getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);*/

        setContentView(R.layout.activity_main);
        txtStatus = (TextView) findViewById(R.id.txtStatus);
//if(getIntent().hasExtra("message")){
if (getIntent().getExtras() != null && getIntent().getExtras().containsKey("message")) {

    Intent intent = new Intent(MainActivity.this,Main3Activity.class);
    //extras.getString("body")
    Intent i = getIntent();
    Bundle extras = i.getExtras();
    String mmsg = "9";
    if (extras != null) {
        for (String key : extras.keySet()) {
            Object value = extras.get(key);
            //Log.d(Application.APPTAG, "Extras received at onCreate:  Key: " + key + " Value: " + value);
            mmsg = …
Mr.M 89 Future Programmers

I've been hearing with this even here in RSA, people are complaining with this, I just wonder how they do it because it seems as if the victim is totally not aware of such.

rproffitt commented: Victims become aware when the losses happen. The SimSwap issue has changed my mind about using my smart phone for more than phone and games. +15
Mr.M 89 Future Programmers

I've managed to solve my problem through this but the problem is the alt it doesn't work at all from the link or image event on both, but thats not much of a problem.

Mr.M 89 Future Programmers

Hi DW.

If you check this you will notice that at the bottom right hand side there's an added image which is also a link for the hosting site, note that I own the site you will see and I'm not the one who added that image but it was added automatically I believe with javascript by the host during the upload.

What I want to achieve is something similar to that or exactly that but obviousely the link and image, title will be different but I want my script which first perform some verification from data base by posting to the php file then based on the response I want to append for now let say that image on the site, but it should be this javascript that appends as the image will be different based on the response.

Here's the code that creates this image and I see theres also a javascript which follows this code and I believe it the script that generated this code to insert/append this image.

<div style="text-align: right;position: fixed;z-index:9999999;bottom: 0;width: auto;right: 1%;cursor: pointer;line-height: 0;display:block !important;"><a title="Hosted on free web hosting 000webhost.com. Host your own website for FREE." target="_blank" href="https://www.000webhost.com/?utm_source=000webhostapp&utm_campaign=000_logo&utm_medium=website&utm_content=footer_img"><img src="https://cdn.000webhost.com/000webhost/logo/footer-powered-by-000webhost-white2.png" alt="www.000webhost.com"></a></div>

If I can be able to DOM appendChild to create the above in javascript that would be great.

Mr.M 89 Future Programmers

Well this is just a demo hosted on a free hosting service. It is meant to show how the library should work when you use it on your website. This is just a demo.

rproffitt commented: So that's the message I'd see if I used it? J.K.? +0
Mr.M 89 Future Programmers

Hi DW.

Can someone with Windows 10 help me out by testing my library on Edge browser and open the developers console and see if there are any errors that are causing the library not to work on Edge browser.

The library is http://iwpe.000webhostapp.com/iwpe

This should encrypt your password on the fly when you have entered it or when you have set your browser to remember it.

First try it on Firefox so you see how it should work, it work perfectly on Firefox but not on Edge.

Mr.M 89 Future Programmers

First of all the link you supplied is broken. Secondly if you have included the JQUERY library reference it should work on Firefox, Firefox seems to be the only reliable browser that allows Javascript as well as JQUERY whereas the rest of the browsers will require some sort of hack due to their policies. In my case I had to make use of the event Listener.

Try using the event listener so that it will trigger when a user perform and click event it can be mouse click or keyboard click. That should be your starting point for cross browser support. But I'm sure Firefox wont require that.

Mr.M 89 Future Programmers

I'm not sure if I hear your question straight. Are you saying on submit you don't want to submit the first two fields values or you want to also keep it for later use?

Mr.M 89 Future Programmers

As web developers we do take seriously the security of our end users by applying a hash method on their passwords before storing it to the database so should our database be hacked we know that our end user passwords are secure.

But what about the browser remembered passwords on the front end? We all know that a password can be viewed on the front end by using a tool called element inspector and change the password type from password to text and we can see the actual password and we can login on our own device with that at our own space.

Let me introduce to you the Instant Web Password Encryption (IWPE). The IWPE encrypt and decrypt browser remembered passwords on the fly. The IWPE encrypt the password and return the 2 level hash as your password which on submit it then calculate the password and attach it to the POST/GET method on submit.

You can try the live demo and see how IWPE works. Check it out iwpe.000webhostapp.com/iwpe

I will provide with the documentation which will outline how you can also use the IWPE on your website, but it very easy to use this library.

Mr.M 89 Future Programmers

Thanks to Dani queen, I was also affected by this as well, tried to reset password but the email wasn't sent to me, I contacted her about this and she assisted me instantly. I was about to loose hope in gaining back my Daniweb account. Thank you Dani.

Mr.M 89 Future Programmers

WhatsApp does read because these othe 6 phones which contacts are stored on google contacts they can use WhatsApp as if contacts are stored in the phone, you wont notice till you go down in developing a contact picker which is when I also knew about this or notice it.

Mr.M 89 Future Programmers

Regarding the permissions, contacts that are saved directly to a phone or sim card can be read both name and number, but these contacts that are saved o google only a name is read but the number is not read.

Mr.M 89 Future Programmers

I have a code that picks contacts, the problem is that if a user pick a contact or choose a contact that was not saved on a phone but was saved on google contacts (This is a way many people now save their contacts so that should their phones are lost but contacts are ever lost because when s/he gets a new phone, s/he will just sign in with google account and get his/her contacts) now my app is able to get the name and return it to an EditText but the number/phone number is not returned in these contacts. Anyone knows what the solution to this? Here is my code:

       switch(requestCode){
            case (1):
                if (resultCode == Activity.RESULT_OK){
                    Uri contactData = data.getData();
                    Cursor c = getActivity().managedQuery(contactData, null,null,null,null);
                    if (c.moveToFirst()){
                        String name = c.getString(c.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));
                        //String number = c.getString(c.getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER));
                        //txtNumber.setText(number);
                        txtName.setText(name);
                    }
                    Cursor cursor = null;
                    String phoneNumber = "";
                    List<String> allNumbers = new ArrayList<String>();
                    int phoneIdx = 0;
                    try{
                        Uri xresult = data.getData();
                        String id = xresult.getLastPathSegment();
                        cursor = getActivity().getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID + "=?", new String[] {id},null);
                        phoneIdx = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);
                        if(cursor.moveToFirst()){
                            while (cursor.isAfterLast() == false){
                                phoneNumber = cursor.getString(phoneIdx);
                                allNumbers.add(phoneNumber);
                                txtNumber.setText(phoneNumber);
                                cursor.moveToNext();
                            }
                        }else{
                            // No result actions
                        }
                    } catch (Exception e){
                        // Error actions
                    } finally {
                        if(cursor !=null){
                            cursor.close();
                        }

                        final CharSequence[] items = allNumbers.toArray(new String[allNumbers.size()]);
                        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
                        builder.setTitle("Choose a number");
                        builder.setItems(items,new DialogInterface.OnClickListener(){
                            public void onClick(DialogInterface dialog,int item){
                                String selectedNumber = items[item].toString();
                                selectedNumber = selectedNumber.replace("-","");
                                txtNumber.setText(selectedNumber);
                            }
                        });
                        AlertDialog alert = builder.create();
                        if(allNumbers.size()>1){
                            alert.show();
                        }else { …
Mr.M 89 Future Programmers

@Suhasini. You can't hijack other people's posts, also you need to show us what you have done, where you stuck or having a problem. One thing you should know MLM systems are a bit complex depending on it function as well as its number of levels. Personally I've used the loops to loop through to find all the relenvent teams and their data, like names, IDs, account types, status, balances etc. If you want to take that approach, well I don't know in your case what you use as identifier of a user, I used unique ids which are generated and issued to a person on registration which is what that person issues to people to join under that person so that the system will know who introduced who.

1) Get the current use's Unique code.
NB: I have a transaction table where I keep track of every action is performed by any users (only the meningful and essential information). I have a column pin, and anotherone ref. pin is for new person introduced by ref.
2) Now get all the pin where ref = this current user's unique code.(These are level1 of this person who's currently logged in)
3) Now that you have the codes for your level 1 now loop for level 2 which is same as of getting level 1 but this time you use the for each statement because you may have more then 1 people on level1 so you need to get …

Mr.M 89 Future Programmers

Hi DW.

Today just came across with something I didn't know of and it may be easy to someone else who had workded with it or had came across it. Look at this example code snippet:

$a = '1';
$b = &$a;
$b = "2$b";
echo $a. ", " .$b ;

This will give you 21, 21 and I didn't see this coming till I looked close to the code and this is caused by line2 which is trigged by &. Now as you can see $a is declared and assigned on line one and it was referenced once in line 2. My question may be stupid but just want to know what & is doing as its also append the 2. If you look very close to the code to these lines: 2 as well as 3, I'm a bit lost.

In line 3 $b = "2$b"; where as in line 2 $b = &$a; which $a = 1; now this 2$b is a bit confusing me as to how it knows 2 and why it doesn't return 221 because what I see is that in line 3 $b = "2{21}"; {} represent the value of line 2.

Anyone who can help me understand whats going on here, I think I see whats happening but can't explain as of answering the question to this. Line 3 is what brings this whole confusion in connection with line 2.

Mr.M 89 Future Programmers

Your question and so is your problem not too clear. Please try first to expain what you want to achieve and then explain what is a problem because I personally don't get your question straight.

Mr.M 89 Future Programmers

That because you did this in the wrong way, you can't expect php to execute html code you need to echo it. The problem is here <h2> Welcome!!!</h2> <option value="realname"><?php echo $_SESSION['firstname']. ' ' .$_SESSION['lastname']?></option> you need to echo that something like this echo "<h2> Welcome !!!</h2>"; echo "<option value='realname'> .$_SESSION['firstname']. ' ' .$_SESSION['lastname']. </option>"; Something like that will solve your problem, didn't test this code but if there is any problem it will be within the SESSIONs so if you get error try to play around with displaying session in that syntex.

Mr.M 89 Future Programmers

I think you are missing ; at the end of your code line 26. Also the undifined index does state that the first is not defined which means at the time of you loading that pay, first wasn't assigned any thing or wasn't even declared as it takes it as something that doesn't exist. Please check your other file code that calls this file and check if this file is called after first was declared and initialiezed, or you can post that other file code here so we will have a look at it. The error says first and last wasn't declared so look into that.

Mr.M 89 Future Programmers

Figured out the problem. On my php file there is a part where I try to send what ever was posted to this file and send it by email, for some reasons that I don't know the POST data is not included in the email and I tried to use var_dump which was what turns out to print back the posted data to my ajax response.

Mr.M 89 Future Programmers

Hi DW.

I'm trying to post data without refreshing the page using the ajax, and its works fine the problem is that on the response I also get the array data that I posted to my php file then at the end of response is the returned data which is echoed from my php file. I post 3 data which are from my form but the problem is that on my response this data is also shown when I do alert(response); please check attached image and you will see that on the alert response firstly the array of what I posted to my php file is returned then my response is returned at the end of the response.

My question is how can I only show the returned response not what I posted to my php file?

$(document).ready(function(){
$("#btn").click(function(){
var custdata = $("#custom_str1").val();
var vname = $("#name").val();
var vemail = $("#email").val();
if(vname=='' && vemail=='')
{
alert("Please fill out the form");
}
else if(vname=='' && vemail!==''){alert('Name field is required')}
else if(vemail=='' && vname!==''){alert('Email field is required')}
else{
$.post("pass.php", //Required URL of the page on server
{ // Data Sending With Request To Server
custom_str1:custdata,
name:vname,
email:vemail
},
function(response){ // Required Callback Function

if(response == "Mr.M"){
    var mdqq = document.getElementById("suc");
    if(mdqq.style.display === "none"){
        mdqq.style.display = "block";
    }
}else{

      var ssgd = document.getElementById("sucaa");
      if(ssgd.style.display === "none"){
          ssgd.style.display = "block";
      }
    }
alert(response);//"response" receives - whatever written in echo of above PHP script.

$("#form")[0].reset();
});
}
});
});

On my php file I simply …