Jump to content

mananx

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mananx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\Installed Programes\Apache\htdocs\vid\index.php on line 25 Error connecting Line 25 says : $con=mysql_connect ($db_host,$db_user,$db_pass) or die("Error connecting"); These variables are being accessed from : require("http://localhost/vid/dbconfig.php"); It works when I replace database variables with values , but I am unable to find out error source can any one guide thanks
  2. Helo , I am trying to run a script , however getting errors ( given at end of post) whenever i open index.php file basically , script is installed in htdocs/video directory , however the warning and error says that it's looking for required files under htdocs . Code on relevant lines for required files is : line: 22require($_SERVER['DOCUMENT_ROOT']."/dbconfig.php"); line 23: require($_SERVER['DOCUMENT_ROOT']."/includes/version.php"); Warning: require(D:/Installed Programes/Apache/htdocs/includes/version.php) [function.require]: failed to open stream: No such file or directory in D:\Installed Programes\Apache\htdocs\video\index.php on line 23 Warning: require(D:/Installed Programes/Apache/htdocs/includes/version.php) [function.require]: failed to open stream: No such file or directory in D:\Installed Programes\Apache\htdocs\video\index.php on line 23 Fatal error: require() [function.require]: Failed opening required 'D:/Installed Programes/Apache/htdocs/includes/version.php' (include_path='.;C:\php5\pear') in D:\Installed Programes\Apache\htdocs\video\index.php on line 23 I dont know why it is not showing up properly , any help ?
  3. Very strange problem . I have the same site hosted on two servers 1) go daddy 2) my local server apache / mysql /php 5 This code is working good on godaddy server , but on my server , sql update query is not executed . Database connection is being made because it shows the data from database . if(isset($_POST['save'])) { $page_name=$_REQUEST['show']; $description=htmlentities( $_POST['elm1']); $sql="UPDATE pages SET description = '".$description."' WHERE page_name = '".$page_name."'"; $db->ExecuteQuery($sql); header("location:index.php?show=".$page_name); exit(); } <form method="post" action="index.php?show=<?=$show?>"> <textarea id="elm1" name="elm1" rows="35" cols="80" style="width: 80%"> <?=$desc?> </textarea> <br /> <input type="submit" name="save" value="submit" /> <input type="reset" name="reset" value="Reset" /> </form>
  4. http://www.zimmertech.com/tutorials/php/51/evaluate-php-code-from-mysql.php found it here thanks
  5. great i m trying to search through net for eval , but am still unable to understant what will ?> do eval(?>'.$_POST['elm1']); like for example $_POST['eml'] = <html><head></head><body><a href = "<? php createurl(www.google.com); ?>" > visit google < /a > </body></html> then what purpose would concatenating '?>' do ..
  6. cool , i got that , thanx . one last thing : do i need to change the way my output is being displayed as well ? <? echo html_entity_decode($obj->description);?> Thanks indeed .
  7. thanks for the reply rhodesa I would want pages stored in database to have urls generated through php . So it'll have to be done before putting data into database . this is how urls are generated : <a href = "<? php createurl(www.google.com); ?>" > visit google < /a > where function would return google.com if session is set , otherwise it'll return url to sign in page ( function takes care of this ) . so will clean_query($description) ; serve the purpose ?
  8. Thanks for very quick reply.. I am sorry , it's using this function to put data into database . if(isset($_POST['save'])) { $page_name=$_REQUEST['show']; $description=htmlentities( $_POST['elm1']); $sql="UPDATE pages SET description = '".$description."' WHERE page_name = '".$page_name."'"; $db->ExecuteQuery($sql); header("location:index.php?show=".$page_name); exit(); } ?> Now what I would want is , that whenever it sees any <?php ?> it should execute it as a code instead of html plain. so should i do this ? clean_query($description) ; before calling db > executequery ?
  9. Hi , My site has a backend , the backend stores data through a WYSISYG editor . This editor is using html entity encode function to store any changes in the database through backend . To display the data stored my site uses htmlentitydecode() function by fetching an object from database . I want to include a php function in the site , however when i enter php function through backend , it simply echoes all php code . e.g. <?php echo "hello"; ?> page displaying code is php itself. Any way to get around this problem ? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.