Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#sub").click(function() {
- $.post( $("#text").attr("action"), $("#text :input").serializeArray(),
- function(info) { $("#result").html(info);});
- });
- $("#text").submit( function(){
- return false;
- })
- $sql = "UPDATE text
- SET text_content = ? WHERE (id = 40) AND (number = $Number);";
- $stmt = mysqli_stmt_init($connection);
- if (!mysqli_stmt_prepare($stmt, $sql))
- {
- header("Location: ../create_text.php?error&prepare1111");
- exit();
- }
- else
- {
- $stmt->bind_param("s", $content);
- mysqli_stmt_execute($stmt);
- mysqli_stmt_close($stmt);
- $connection->close();
- echo "successfully saved";
- }
- <form type="text" method="post" onSubmit="return validateText(); toHTML();" action="processing.php" id="text">
- <textarea name="content" rows="45" id="auto-expand" class="text-box" type="text"><?php echo stripslashes($content) ?></textarea>
- <input type="hidden" name="id" id="id" value="<?php echo $id ?>">
- <input type="hidden" name="number" id="number" value="<?php echo $number ?>">
- <input type="hidden" name="updated" value="<?php echo $updated ?>">
- <button type="submit" id="sub" name="submit">Save</button>
- <button type="button" onClick="validateText(); toHTML();">Check</button>
- <span id="result"></span>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement