Jump to content

[SOLVED] read the current pages url?


commanda

Recommended Posts

I want to instigate an automatic error reporting system; send an email to the sys admin when a mysql error occurs.

I want to do this by including a standard include file which will read the current pages url plus the mysql error message.

 

eg:

$result = mysql_query(" blah'" );

if(!$result)

  {

  include("email error to sysadmin.inc");

  echo "error has been emailed to sys admin";

  exit;

  }

 

email error to sysadmin.inc

  subject = system error

  body = page.url + mysql error message

  email address = sysadmin

  send email

 

Q: how do I read the current pages url?

It can't be hard-coded because it will usually include a heap of GET strings particular to the current error.

 

Any help appreciated.

 

Amanda

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.