ESP8266 Older Code Not Being Fully Replaced

So i had flashed my esp8266 with older code from a .bin file but now using Arduino IDE and trying to upload the following code to launch a simple wifi isn’t launching any wifi but showing the older wifi that was being used in the previous flash as if it’s not even being flashed though i had tried LEDblink on it successfully.

#include <ESP8266WiFi.h>

void setup()

 WiFi.begin("ok", "123456789");

 while (WiFi.status() != WL_CONNECTED)

 Serial.print("Connected, IP address: ");

void loop() {}

What do you mean by “showing the older wifi”?

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn’t show the posting toolbar, then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Also posted at: If you're going to do that then please be considerate enough to add links to the other places you cross posted. This will let us avoid wasting time due to duplicate effort and also help others who have the same questions and find your post to discover all the relevant information. When you post links please always use the chain links icon on the toolbar to make them clickable.

Thanks for the headsup guys, just trying to get used to technical forums! i added the code quotes and someone on the github link helped by suggesting i erase flash, not sure how to lock this thread though.

Have you tried putting WiFi.persistent(false); as the first line in setup()?