0

Php is able to find the database i created with javascript, but php is unable to find the table and (therefore the data) i made with javascript.

Opening db in php

$dbhandle = sqlite_open('db.sqlite', 0666, $error);

Opening db in javascript

db = openDatabase('db.sqlite', '1.0', 'db.sqlite', 65536);                          

I hope i provided enough information, if more code is required please let me know.

5
  • 1
    You're not familiar with how PHP and JS work, right? Commented Apr 13, 2013 at 10:16
  • No one can help you without context. Commented Apr 13, 2013 at 10:18
  • I totally forgot about server/client side... Does anybody know how i Can download the sqlite db and access it that way with php? Commented Apr 13, 2013 at 10:25
  • Having a client-side database seems an odd way to develop a we bapp, I would leave it server-side and look into AJAX to pass data between PHP and JS. Commented Apr 13, 2013 at 12:00
  • I have to save stuff client-side this way the web-app can be used offline. Commented Apr 13, 2013 at 12:51

1 Answer 1

2

Javascript is client side, while PHP is server side.

You will need to keep seperate databases and sync them

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.