zbrahead Posted March 6, 2006 Share Posted March 6, 2006 i enclose my dataputfm.html and dataputcon.php and if you can make this work i will ermm.... worship you?!?:) the account details are in the php script and dont try loging into the cPanel as the password is dofferent thankyou.Dataputfm.html:[code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#000000" text="#CCCCCC"><p> </p><form name="form1" method="post" action="dataputcon.php"> <p>Link (to comply with IMPACT Games standards MUST end in .swf): <input name="link" type="text" id="link"> </p> <p>name: <input name="name" type="text" id="name"> </p> <p>comments : <input name="comments" type="text" id="comments3"> </p> <p> <input type="submit" name="Submit" value="Lock 'n' load game"> </p> <p> </p></form></body></html>[/code]Dataputcon.php:[code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#000000"><?php$link = $_POST['link']$name = $_POST['name']$comm = $_POST['comments']#mySQL connection$conn = mysql_connect( "localhost" , "ricfo0i1_ricfon" , "polionum" ) or die( "no mysql" )# Database connection$rs = mysql_select_db( "gamelist" , $conn ) or die( "no DB" );#Form query#$sql = "insert into list ( "name" , "comments" ) values ( "$a" , "$comm" ) ";$sql = 'INSERT INTO `list` (`id`, `name`, `comments`) VALUES (\'\', \'<a href="$link" target="_top">$name</a>\', \'$comm\')';#run query$rs = mysql_query( $sql , $conn ) or die( "query error" ); echo( "putted succesfully" )?></body></html>[/code] Link to comment https://forums.phpfreaks.com/topic/4201-php-and-mysql-help/ Share on other sites More sharing options...
AndyB Posted March 6, 2006 Share Posted March 6, 2006 Do we get a clue? What doesn't work? Do you get an error? What's the error message? Maybe this will help in the interim:[code]$sql = "INSERT INTO `list` (id, name, link, comments) VALUES ('', '$name', '$link', '$comm') ";[/code] Link to comment https://forums.phpfreaks.com/topic/4201-php-and-mysql-help/#findComment-14602 Share on other sites More sharing options...
Prank Posted March 6, 2006 Share Posted March 6, 2006 couple of syntactical errors... Try this;[code]<?php$link = $_POST['link'];$name = $_POST['name'];$comm = $_POST['comments'];#mySQL connection$conn = mysql_connect( "localhost" , "ricfo0i1_ricfon" , "polionum" ) or die( "no mysql" );# Database connection$rs = mysql_select_db( "gamelist" , $conn ) or die( "no DB" );#Form query#$sql = "insert into list ( "name" , "comments" ) values ( "$a" , "$comm" ) ";$sql = 'INSERT INTO `list` (`id`, `name`, `comments`) VALUES (\'\', \'<a href="$link" target="_top">$name</a>\', \'$comm\')';#run query$rs = mysql_query( $sql , $conn ) or die( "query error" );echo( "putted succesfully" );?>[/code]If no go, report the error.Oh, and what AndyB said.Christian Link to comment https://forums.phpfreaks.com/topic/4201-php-and-mysql-help/#findComment-14603 Share on other sites More sharing options...
zbrahead Posted March 6, 2006 Author Share Posted March 6, 2006 Thanks For replying to my horrible post so now i have more tiome i would like to say please and thankyou and that there was no error Link to comment https://forums.phpfreaks.com/topic/4201-php-and-mysql-help/#findComment-14613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.