Go Back   Web User Forums > All Other Technical Help Topics > Web design & build

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old 15-08-18, 20:05
TheClash TheClash is offline
Enthusiastic contributor
 
Join Date: Sep 2015
Posts: 252
Default Re: sql or sqli

is it possible to use php myadmin to generate the php code to add to yoor web page?
Reply With Quote
  #12  
Old 16-08-18, 11:14
Sneakybeaky's Avatar
Sneakybeaky Sneakybeaky is offline
Passionate member
 
Join Date: Aug 2012
Location: Gosport Hants
Posts: 1,292
Default Re: sql or sqli

No.
It can only be used to create a script for generating a table.
https://www.itsupportguides.com/know...ng-phpmyadmin/
__________________
Contrariwise,continued Tweedledee, if it was so, it might be; and if it were so, it would be: but as it isn't, it ain't. That's logic.
Reply With Quote
  #13  
Old 16-08-18, 12:28
Sneakybeaky's Avatar
Sneakybeaky Sneakybeaky is offline
Passionate member
 
Join Date: Aug 2012
Location: Gosport Hants
Posts: 1,292
Default Re: sql or sqli

You seem to be determined to program this script yourself, but if this proves impossible then consider an ‘off the peg’ script for your webpage. Softaculous provide many.
https://www.softaculous.com
Many can be installed via your website control panel, if you host has enabled them.
__________________
Contrariwise,continued Tweedledee, if it was so, it might be; and if it were so, it would be: but as it isn't, it ain't. That's logic.
Reply With Quote
  #14  
Old 16-08-18, 19:19
TheClash TheClash is offline
Enthusiastic contributor
 
Join Date: Sep 2015
Posts: 252
Default Re: sql or sqli

echo"working";

/*Please Do not change anything below this line */

$link = mysqli_connect("$mysqli_host", "$mysqli_user", "$mysqli_password", "$my_database")
or die("Could not connect : " . mysqli_error($link));
echo "Connected successfully";
mysqli_select_db($link, "$my_database") or die("Could not select database");




i have above code working it is when i try to add next bit - the code above has sqli?


$sql="INSERT INTO nametable (name, email)

VALUES

('$_POST[name]','$_POST[email]')";



if (!mysql_query($sql,$con))

{

die('Error: ' . mysql_error());

}






working----Connected successfully
Fatal error: Uncaught Error: Call to undefined function mysql_query() in /homepages/34/d747981205/htdocs/SQL/insert.php:41 Stack trace: #0 {main} thrown in /homepages/34/d747981205/htdocs/SQL/insert.php on line 41

i had this code workign on a different server.
Reply With Quote
  #15  
Old 16-08-18, 19:23
TheClash TheClash is offline
Enthusiastic contributor
 
Join Date: Sep 2015
Posts: 252
Question Re: sql or sqli

Quote:
Originally Posted by Sneakybeaky View Post
You seem to be determined to program this script yourself, but if this proves impossible then consider an ‘off the peg’ script for your webpage. Softaculous provide many.
https://www.softaculous.com
Many can be installed via your website control panel, if you host has enabled them.

I was just using it to learn php /mySQL/PHPADMIN


have a some free scripts added a free forum will have to look at what 1 and 1 provide. I have wordpress site with them but also want to keep this site LAMP to learn programming.
Reply With Quote
  #16  
Old 16-08-18, 19:48
Sneakybeaky's Avatar
Sneakybeaky Sneakybeaky is offline
Passionate member
 
Join Date: Aug 2012
Location: Gosport Hants
Posts: 1,292
Default Re: sql or sqli

This may work
VALUES ('{$_POST[name]}', '{$_POST[email]}')");

If not then you will need to create a variable from $_POST and then insert that.
__________________
Contrariwise,continued Tweedledee, if it was so, it might be; and if it were so, it would be: but as it isn't, it ain't. That's logic.
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Search the forum

Search

© Dennis Publishing Limited Licensed by Felden





All times are GMT. The time now is 05:29.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright Dennis Publishing 2010, All rights reserved