Skip to content
Advertisement

values inserted as null into database

hi im trying to insert a url and its content into 2 table but i will use an id from a table and insert this id in multiple entries in the second table i hope i succeed to clarify my issue here the probleme that i can view data but i cant insert data in mysql using pdo all i got in mysql is NULL values is my code for more clarification

first my class file is like that Links.php

JavaScript

for file.php it is like that:

JavaScript

all i got for inserted values is null

Advertisement

Answer

i found a solution i just work with global i put it in file.php in the two function and tadaaa it worked

global $listId; but i had to insert from this file not from the class .

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement