On any car if you get a check engine light or other fault light this typically means one or more of the sensors has failed or has a faulty connection.
The ECU senses this and may put the car into 'limp home' mode which typically limits the revs and the amount of power available. Usually the car is safe to drive for a short distance as the mode is intended is intended to get you home without incurring any engine damage
The quickest route to repair is to have the car plugged into a diagnostic machine which will read off the fault code stored in the ECU (providing the light is still on at this point) and indicate which sensor has failed or whether the fault is more serious.
You can do a very rough and ready check yourself by unplugging sensors one at a time and seeing if any of them change the driving condition which would indicate the most recently unplugged sensor is the faulty one. This method is not foolproof though and reading a fault code off is the better method.
from your description I'd say it must be a major sensor fault or a lack of fuel pressure
its also possible that the throttle body has failed so it no longer opens the throttle
this one can be tested though, if yiou remove the intake pipe so you can see the throttle , then with the ignition on but engien off have your assistant slowly push down on the accelerator pedal
the throttle butterfly shoudl open smoothly and slowly to fully open
if it doesn't then get the codes read off as this will show if its the pedal or the throttle body itself
how do you check lack of fuel pressure
yo need a pressure gauge
there should be a little test point on the injector rail
ok thanks for ur help i,ll try that have a good new year