Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in fetch array and not showing submit button on add list #2

Closed
imdewan opened this issue Aug 14, 2020 · 8 comments
Closed

Error in fetch array and not showing submit button on add list #2

imdewan opened this issue Aug 14, 2020 · 8 comments

Comments

@imdewan
Copy link

imdewan commented Aug 14, 2020

Screenshot (1)
Screenshot (2)

@pepiuox
Copy link
Owner

pepiuox commented Aug 15, 2020

Thank you very much for your contribution, now you can verify, the error is corrected

@imdewan
Copy link
Author

imdewan commented Aug 15, 2020

123

121

the first error comes if we didn't upload error and the second one comes if we fill all inputs. Also the page doesn't create

@imdewan
Copy link
Author

imdewan commented Aug 15, 2020

image

After adding a folder 'uploads' reduces some errors but the page is still not created

@pepiuox
Copy link
Owner

pepiuox commented Aug 15, 2020

image

After adding a folder 'uploads' reduces some errors but the page is still not created

add.php is updated now.

@imdewan
Copy link
Author

imdewan commented Aug 16, 2020

image

There is some sql error so i echo it.. have a look.

@imdewan
Copy link
Author

imdewan commented Aug 16, 2020

Thank u for ur help but i solved the error
add this line in add.php after $parent = $_POST['parent']; ---

if(!is_int($parent)){
$parent = 0;
}

@pepiuox
Copy link
Owner

pepiuox commented Aug 17, 2020

Thank u for ur help but i solved the error
add this line in add.php after $parent = $_POST['parent']; ---

if(!is_int($parent)){
$parent = 0;
}
In the page table, parent is default '0', if not is selected you can use
// If parent not is integer or is empty
if (!is_int($parent) || empty($parent)) {
$parent = 0;
}

// Store in folder pages
$directory = 'pages/';
//Check if the directory already exists.
if (!is_dir($directory)) {
//Directory does not exist, so lets create it.
mkdir($directory, 0755, true);
}
// If you use and make php file
// $link_path = $directory . $link . ".php";
// If you use and make html file
$link_path = $directory . $link . ".html";
$myfile = fopen($link_path, "w") or die("Unable to open file!");
// For redirect php
// $txt = '';
// For redirect html
$txt = '<script>window.location.replace("../view.php?id=' . $last_id . '");</script>';
fwrite($myfile, $text);
fclose($myfile);

@pepiuox
Copy link
Owner

pepiuox commented Aug 17, 2020

Sorry this code is for php
// For redirect php
$txt = '';
If not see the code check last update, I added your code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants