logo
down
shadow

Is it good to store dynamically created file's paths in database ?


Is it good to store dynamically created file's paths in database ?

By : user3850985
Date : October 18 2020, 11:12 AM
Hope that helps If you have no other way of finding the file, storing its path in the DB is probably OK.
Still, a couple of notes :
code :


Share : facebook icon twitter icon
How can I store dynamically created form inputs to a database using ajax

How can I store dynamically created form inputs to a database using ajax


By : user2810792
Date : March 29 2020, 07:55 AM
it helps some times I have asked a similar question but the answers didn't really help me in solving or think of a solution. , Option A:
Use standard PHP.
code :
<input type="text" class="r" name="scene[]" value="1" />
<input type="text" class="r" name="int_ext[]" value="INT" />
<input type="text" class="r" name="scene_desc[]" value="Bedroom" />
<input type="text" class="r" name="day_night[]" value="DAY" />

<input type="text" class="r" name="scene[]" value="2" />
<input type="text" class="r" name="int_ext[]" value="EXT" />
<input type="text" class="r" name="scene_desc[]" value="Outside" />
<input type="text" class="r" name="day_night[]" value="DAY" />

<input type="text" class="r" name="scene[]" value="3" />
<input type="text" class="r" name="int_ext[]" value="INT" />
<input type="text" class="r" name="scene_desc[]" value="Bedroom" />
<input type="text" class="r" name="day_night[]" value="DAY" />

<input type="text" class="r" name="scene[]" value="4" />
<input type="text" class="r" name="int_ext[]" value="EXT" />
<input type="text" class="r" name="scene_desc[]" value="Bedroom" />
<input type="text" class="r" name="day_night[]" value="NIGHT" />
<?php

foreach($_POST['scene'] as $k=>$scene) {
    $int_ext = $_POST['int_ext'][$k];
    $scene_desc = $_POST['scene_desc'][$k];
    $day_night = $_POST['day_night'][$k];

   mysql_query("INSERT INTO (`project_id`, `scene_number`, `int_ext`, `scene_description`, `day_night`) VALUES (10, '{$scene}', '{$int_ext}', '{$scene_desc}', '{$day_night}')");
}

?>
<input type="text" class="r" name="scene" value="1" />
<input type="text" class="r" name="int_ext" value="INT" />
<input type="text" class="r" name="scene_desc" value="Bedroom" />
<input type="text" class="r" name="day_night" value="DAY" />

<input type="text" class="r" name="scene" value="2" />
<input type="text" class="r" name="int_ext" value="EXT" />
<input type="text" class="r" name="scene_desc" value="Outside" />
<input type="text" class="r" name="day_night" value="DAY" />

<input type="text" class="r" name="scene" value="3" />
<input type="text" class="r" name="int_ext" value="INT" />
<input type="text" class="r" name="scene_desc" value="Bedroom" />
<input type="text" class="r" name="day_night" value="DAY" />

<input type="text" class="r" name="scene" value="4" />
<input type="text" class="r" name="int_ext" value="EXT" />
<input type="text" class="r" name="scene_desc" value="Bedroom" />
<input type="text" class="r" name="day_night" value="NIGHT" />
$("#submitbutton").click(function() {
    var data = {};
    $("input[name=scene]").each(function() {
        data[$(this).val()] = {
            intext: $(this).next("input[name=int_ext]").val(),
            desc: $(this).next("input[name=scene_desc]").val(),
            daynight: $(this).next("input[name=day_night]").val()
        };
    });
    $.post("/submit.php", {data: JSON.stringify(data)}, function(resp) {
        //success
    });
});
<?php

$scenes = json_decode($_POST['data']);

print_r($scenes); //you should be able to figure out what to do with it from there...

?>
using localstorage in hmtl5 to store a dynamically created div without using database

using localstorage in hmtl5 to store a dynamically created div without using database


By : Aedan Velasquez
Date : March 29 2020, 07:55 AM
wish helps you I am trying to develop a web app (hybrid application) using Html5 css3 jquery, jquery mobile phonegap and Dreamweaver cs6. , Sure you can
Save it
code :
if (('localStorage' in window) && window['localStorage'] !== null) {
        var divtosave = $("#divtosave").html();
        localStorage.setItem('saveddiv', divtosave);
});
if ('saveddiv' in localStorage) {
        $("#div").html(localStorage.getItem('saveddiv'));
}
localStorage.clear(); //release it
How to store the textbox values in database which is created dynamically in mvc

How to store the textbox values in database which is created dynamically in mvc


By : user2867459
Date : March 29 2020, 07:55 AM
wish help you to fix your issue in your database class, define "Name" as list,array or any collection type. For example;
code :
public class database{
    string[] Names;
}
<input type="text" name="Names" />
<input type="text" name="Names" />
...
public ActionResult Add(database db)
{
    database objdb = new database();   

    for(...){
        objdb.adddata(db.Names[i]);  
    }     

    return View();
}
how to upload multiple files, store their paths in different columns in a mysql database row

how to upload multiple files, store their paths in different columns in a mysql database row


By : user3718188
Date : March 29 2020, 07:55 AM
With these it helps Hello i am trying to create a subscription form, that allows a user to fill in a form and upload multiple files. already i have gotten some directions on this site as regards uploading a file and storing their paths in a database using this. , you have to change their as
code :
$pic1=($_FILES['photo1']['name']);
$pic2=($_FILES['photo2']['name']);
$pic3=($_FILES['photo3']['name']);
for($i=1;$i<=3;$i++)
{
if(move_uploaded_file($_FILES['photo'.$i]['tmp_name'], $target))
{

//Tells you if its all ok
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
}
else {

//Gives and error if its not
echo "Sorry, there was a problem uploading your file.";
}
}
and in your query you can change it with like a

    mysql_query("INSERT INTO tableName 
               (nameMember,bandMember,photo,photo1,photo2,aboutMember,otherBands)
               VALUES ('$name', '$bandMember', '$pic','$pic1','$pic2', '$about', '$bands')") ;
Store different value in the database from the forms created dynamically using PHP?

Store different value in the database from the forms created dynamically using PHP?


By : Vidhi
Date : March 29 2020, 07:55 AM
will help you Have a look at the screenshot below. , To expand on what @Logan Wayne pointed out...
code :
// 2. Define what to do when XHR feed you the response from the server - Start

var product = document.getElementById("product").value; <-- will always return the same element 
var pp1 = document.getElementById("pp1").value; <-- will always return the same element
var rp1 = document.getElementById("rp1").value; <-- will always return the same element 
var stacking = document.getElementById("stacking").value; <-- will always return the same element 
...
var products = document.getElementsByClassName("product"); <-- array of product td elements
...
Related Posts Related Posts :
  • Rounded C file type in PhpStorm instead of PHP
  • Route [admin.settings.edit] not defined laravel
  • can't resolve error "object not found" while read and displaying data on same page
  • form validation on codeigniter if the value is empty and below 100
  • PHP How to select values that are > or < from a multidimensional array
  • Saving object to a session - How do I fetch my object from the session as it was before?
  • Repetion while importing data from XML ( Simple XML Parser ) PHP
  • Query specific case condition
  • remove attribute in xml
  • PHP - aria-current not display
  • Is it possible to register some callback function to free resources after a curl request has finished?
  • Soap Response not XML but String
  • Laravel 5.7 echo out session value in blade
  • unable to redirect records based on the dynamic address
  • Unable to use SMTP Gmail server to send email authentications
  • MySQL: Create a query with multiple SELECTS using the result of the previous query
  • php - Masking a Phone Number regardless of length
  • Is there a real difference between mysqli::num_rows and mysqli::affected_rows when doing a SELECT
  • How in laravel eloquent make query with multiple 'and'?
  • how to get lowest unique bid in SQL
  • Optimizing queries for the next and previous element
  • How to read XML string with PHP
  • CodeIgniter captcha not working
  • Advice: building a non-database driven simple CMS in PHP
  • How to insure column match for MySQL insert, when number and names of input fields will vary?
  • Redirect to previous page after logging in using PHP
  • if isset SESSION display div
  • How to take an engineered approach to making a website?
  • Passing user-defined types in PHP SOAP
  • Google Local Search PHP to Javascript
  • Storing contents of a PHP array in a MySQL database
  • php mysql connection does not show results why
  • Is there any PHP Object Oriented Programming in Practice Tutorial?
  • How to implement flyweight pattern in php?
  • How to pass id value with jquery to PHP?
  • How can I know the status of a call - Asterisk and PHP?
  • Is it good practice to use break and continue in PHP?
  • PHP mysqli updating a blob value in table does nothing
  • PHP var_dump array
  • Advanced Htaccess Rewrite Rule For PHP
  • PHP function structure issue
  • Good framework for logins in PHP
  • PHP StdErr after Exec()
  • Are there any PHP code visualization tools?
  • CakePHP pagination and the get parameters
  • How to match a string which doesn't contain a dot (.) using regular expression?
  • PHP support printer settings?
  • PHP remove all caps
  • PHP Session_start is hanging
  • Set PHP cron job on windows server 2003
  • Cannot execute two mysql queries at once in PHP
  • PHP delete from file
  • Need help with a PHP preg_match
  • Access gmail or yahoo mail using script
  • Checking for an empty field with MySQL
  • How can I cut an image from the bottom using PHP?
  • Remove multiple whitespaces
  • Why is unserialize_callback_func needed when spl_autoload_register is already used?
  • draw binary tree with php
  • How do I parse a string for a particular delimited section within PHP?
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org