SHARE
TWEET
Untitled
a guest
Jan 29th, 2018
50
in 21 hours
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- <?php
- $link = mysqli_connect("localhost", "my_user", "my_password", "world");
- /// create cart
- $query = "INSERT INTO myCity VALUES (NULL, 'Stuttgart', 'DEU', 'Stuttgart', 617000)";
- /// run the query
- mysqli_query($link, $query);
- $cart_id = 0
- if ($cart_id = mysqli_insert_id($link)){// if success
- printf ("New Record has id %d.\n", $cart_id);
- }else{
- // handle errors
- }
- /// Modify this to create a user account
- if ($result = mysqli_query($link, "insert..... ..... .... " . $cart_id)) {
- printf("Select returned %d rows.\n", mysqli_num_rows($result));
- /* free result set */
- mysqli_free_result($result);
- }else{// if failed...
- //
- }
- ?>
RAW Paste Data

