Whats wrong with my php script?
Hi, I'm (slowly) learning php and am having trouble getting this script to work. It is meant to redirect to paygol once the user clicks a button but for some reason it's not redirecting and just sits on a page telling the user they will be redirected soon.... Is there anything glaringly obvious that stands out to a more advanced php user than myself? There are no syntax errors in dreamweaver but i can't put my finger on what the problem is! Any tips/advice would be appreciated. Many thanks.
get_results($sql); foreach ($settings as $service) { // retrieve service information we need $pg_serviceid = $service->pg_serviceid; $pg_currency = $service->pg_currency; $pg_price = $service->pg_price; $pg_button = $service->pg_button; } // I used the same URL in all cases, just add different url parameter in the different cases. $pg_cancel_url= home_url().’/’."payment/?cancel_post_id=$post_id"; $pg_notify_url = home_url().’/’."payment/?success_post_id=$post_id"; $pg_return_url = home_url().’/’."payment/?success_post_id=$post_id"; ?>
Just a brief look and I see a couple of things.
In function cp_dashboard_paygol_button($post_id, $type) {I don't see an ending }
I don't see anywhere in the script a redirect like a header command or opening a new window to a new URL.
Similar Messages
-
Whats wrong with this javascript
<html>
<head>
<script type="text/javascript">
function gup( name )
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var tmpURL = window.location.href;
var results = regex.exec( tmpURL );
alert("Hello");
alert('hello');
if( results == null )
return "";
else
return results[1];
</script>
</head>
<body>
windows.alert("Hello");
gup('_id7');
<iframe
var frank_param = javascript:gup('_id7');
window.alert(tmpURL );
alert("Hello");
alert(frank_param);
src="http://129.312.120.36:8992/GemLogin-ViewController-context-root/faces/login.jsp?_id7="+'javascript:parent.gup('_id7')'+"&_id8="+'javascript:gup('_id8')'"
width="980"
height="500"
scrolling = "no"
frameborder="0">
</iframe>
</body>
</html>None of the alert get executed. and more over I am not able to build the src= .... Url successfully. Whats wrong with syntax ??
thanks,
pp<html>
<head>
<script type="text/javascript">
function gup( name )
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var tmpURL = window.location.href;
var results = regex.exec( tmpURL );
alert("Hello");
alert('hello');
if( results == null )
return "";
else
return results[1];
</script>
</head>
<body>
windows.alert("Hello");
gup('_id7');
<iframe
var frank_param = javascript:gup('_id7');
window.alert(tmpURL );
alert("Hello");
alert(frank_param);
src="http://129.312.120.36:8992/GemLogin-ViewController-context-root/faces/login.jsp?_id7="+'javascript:parent.gup('_id7')'+"&_id8="+'javascript:gup('_id8')'"
width="980"
height="500"
scrolling = "no"
frameborder="0">
</iframe>
</body>
</html>None of the alert get executed. and more over I am not able to build the src= .... Url successfully. Whats wrong with syntax ??
thanks,
pp -
When I try to power up my iphone 4 32g, it will stay on the apple screen for a few seconds then turn off. even when I try connecting it to my computer it turns on for a few seconds then turns off. Whats wrong with it? and what do I do about it?
Have you tried charging it with another known working USB sync cable? After letting it sit to "charge" for at least 30 minutes, have you tried resetting the device by pressing and holding both the Select/Center and Menu buttons together long enough for the Apple logo to appear.
B-rock -
My phone has been asked to be plugged into itunes for the past hour or so, and it has been plugged in the whole time... i have tried holding in both buttons too turn it on and nothing is happening... whats wrong with it and how do i fix this :(?
Does iTunes see your phone?
Do you have a PC or a Mac?
~Lyssa -
when i open itunes, it gives me a message "the folder itunes is on a locked disk or you do not have write permissions for this folder" i am the only user and it was working a week ago whats wrong with it? it will not open itunes
Hi lvdmerwe!
I have two articles here for you that should be able to help you troubleshoot this issue further:
Trouble adding music to iTunes library or importing audio CD
http://support.apple.com/kb/ts1387
iTunes: Missing folder or incorrect permissions may prevent authorization
http://support.apple.com/kb/ts1277
Take care, and thanks for visiting the Apple Support Communities.
-Braden -
i if use "search" in music on my ipod touch 5th gen the result just show only album and playlist but nothing song result.whats wrong with it?please help
The users guide says:
Spotlight searches the following:
Contacts—All content
Apps—Titles
Music—Names of songs, artists, and albums, and the titles of podcasts and videos
Podcasts—Titles
Videos—Titles
Audiobooks—Titles
Notes—Text of notes
Calendar (Events)—Event titles, invitees, locations, and notes
Mail—To, From, and Subject fields of all accounts (the text of messages isn’t searched)
Reminders—Titles
Messages—Names and text of messages
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Unsynce all music and resync
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup
- Restore to factory settings/new iOS device.
- Make an appointment at the Genius Bar of an Apple store.
Apple Retail Store - Genius Bar -
HELP PLEASE - WHATS WRONG WITH THIS CODE
Hi. I get this message coming up when I try to compile the code,
run:
java.lang.NullPointerException
at sumcalculator.SumNumbers.<init>(SumNumbers.java:34)
at sumcalculator.SumNumbers.main(SumNumbers.java:93)
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)
I am not sure whats wrong with the code. Any assistance would be nice. The code is below.
package sumcalculator;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SumNumbers extends JFrame implements FocusListener {
JTextField value1;
JTextField value2;
JLabel equals;
JTextField sum;
JButton add;
JButton minus;
JButton divide;
JButton multiply;
JLabel operation;
public SumNumbers() {
SumNumbersLayout customLayout = new SumNumbersLayout();
getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
getContentPane().setLayout(customLayout);
value1.addFocusListener(this);
value2.addFocusListener(this);
sum.setEditable(true);
value1 = new JTextField("");
getContentPane().add(value1);
value2 = new JTextField("");
getContentPane().add(value2);
equals = new JLabel("label_1");
getContentPane().add(equals);
sum = new JTextField("");
getContentPane().add(sum);
add = new JButton("+");
getContentPane().add(add);
minus = new JButton("-");
getContentPane().add(minus);
divide = new JButton("/");
getContentPane().add(divide);
multiply = new JButton("*");
getContentPane().add(multiply);
operation = new JLabel();
getContentPane().add(operation);
setSize(getPreferredSize());
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
public void focusGained(FocusEvent event){
try {
float total = Float.parseFloat(value1.getText()) +
Float.parseFloat(value2.getText());
sum.setText("" + total);
} catch (NumberFormatException nfe) {
value1.setText("0");
value2.setText("0");
sum.setText("0");
public void focusLost(FocusEvent event){
focusGained(event);
public static void main(String args[]) {
SumNumbers window = new SumNumbers();
window.setTitle("SumNumbers");
window.pack();
window.show();
class SumNumbersLayout implements LayoutManager {
public SumNumbersLayout() {
public void addLayoutComponent(String name, Component comp) {
public void removeLayoutComponent(Component comp) {
public Dimension preferredLayoutSize(Container parent) {
Dimension dim = new Dimension(0, 0);
Insets insets = parent.getInsets();
dim.width = 711 + insets.left + insets.right;
dim.height = 240 + insets.top + insets.bottom;
return dim;
public Dimension minimumLayoutSize(Container parent) {
Dimension dim = new Dimension(0, 0);
return dim;
public void layoutContainer(Container parent) {
Insets insets = parent.getInsets();
Component c;
c = parent.getComponent(0);
if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+48,128,40);}
c = parent.getComponent(1);
if (c.isVisible()) {c.setBounds(insets.left+256,insets.top+48,128,40);}
c = parent.getComponent(2);
if (c.isVisible()) {c.setBounds(insets.left+408,insets.top+48,56,40);}
c = parent.getComponent(3);
if (c.isVisible()) {c.setBounds(insets.left+488,insets.top+48,152,40);}
c = parent.getComponent(4);
if (c.isVisible()) {c.setBounds(insets.left+128,insets.top+136,72,40);}
c = parent.getComponent(5);
if (c.isVisible()) {c.setBounds(insets.left+248,insets.top+136,72,40);}
c = parent.getComponent(6);
if (c.isVisible()) {c.setBounds(insets.left+368,insets.top+136,72,40);}
c = parent.getComponent(7);
if (c.isVisible()) {c.setBounds(insets.left+488,insets.top+136,72,40);}
c = parent.getComponent(8);
if (c.isVisible()) {c.setBounds(insets.left+176,insets.top+48,56,40);}
}Thank you. How do i amend this? I have defined value1though.Yes, you did - but after the call to addFocusListener(...). It needs to be before it.
BTW, you did the same thing with "value2.addFocusListener(this)" and "sum.setEditable(true)" on the next two lines. You're attempting to call a method on an object that doesn't exist yet (i.e., you haven't called new yet). -
I have the Iphone 3gs and it said update required and i needed to connect to itunes so i did al that and now everytime i go to restore everything it just says error and then i have to do it again?whats wrong with it?
Are you getting an error message number with your error message? If so, what number are you getting?
-
My lap top is extremly slow. It studders. It kind of sounds like there is a fan inside and it constantly stopping and starting. And, it takes a really long time for it too start up. Whats wrong with it?
Do you have current backups?
Those symptoms could indicate a failing Hard drive. If it dies, all your documents go with it unless you have Backups.
I have had very good luck with physical and battery problem diagnosis at the Genius Bar. Those guys put their hands (and their ears) to these machines, all day every day, and they know immediately what all those sounds mean.
Your appointment for an evaluation is FREE, in warranty or out. -
after updating 4.3.1 to 4.3.3 my i phone 4's wifi is not working 2 to 3 hrs of it ,but 3 hrs i was downloding free soft 4m itunes.............so what wrong with my phone
Thanks for reply,
It's truely a disestar for me to kill my phone myself by so called bloody upgradation.
Iwish I have not upgraded.
I baught it from here in Bangladesh and now I’m ina mess to get at least a minimum support.
Thanks for your valued suggessions but it didn’tmade any difference to my situation.
So now I have an ipod in the price of an iPhone4. Crap.
Is there any chance of fixing this bug by apple?As the same problem has already been faced by a lot of iPhone Users. -
I just got a ipod nano 6th gen, and ive been using it for 2 days, and it seems that the battery just lasts about half a day, on playing 1 to 3 songs in intervals of 1-2 hours. Whats wrong with my ipod?
Your nano would really have nothing to do with it at that point. It is really something between iTunes and whatever server out there on the internet that it is trying to connect to for the update.
Try posting this one in the iTunes forum, they might have a solution for you.
i -
Whats wrong with the servers i cant download update 5.1 firmware
whats wrong with the servers i cant download update 5.1 firmware ive been trying for 2 days it says i dont have permission to access the requested source
What says you don't have permission to access the requested source? That is not an error that should come up at all either from iTunes or when attempting an over the air upgrade. At least not an error that has anything to do with the servers.
It could be a permissions problem on your computer or an issue being caused by your firewall or antivirus software. -
I have been trying to open itunes that has already been installed. But, the thing is it never opens and when i do right click and trouble shoot also, it doesnt open. I dont whats wrong with itunes and my comp is 64 bit windows 7. Can somebody please help
no its 64 bit version of itunes. Can you please help me. I am not able to sync my iphone.
-
What wrong with the buttery ?
hallow
my question about the buttery i don't know what wrong with it . the buttery get finish after one and half hour using .
please help me
my Email
[email protected]
my mobile
+966554302679Hi kamranh,
I'd try starting Firefox in [[Safe Mode]]. If you don't have the issue while all of your add-ons, extensions, and themes are disabled, you can try adding them back in one by one until you find the culprit. You should look at the [https://support.mozilla.org/en-US/kb/Troubleshooting-extensions-themes Extensions and Themes troubleshooting guide ] and the [[Troubleshooting plugins]] article as well.
From the looks of it though, your issue may be because you've been hit with some [https://support.mozilla.org/en-US/kb/Is%20my%20Firefox%20problem%20a%20result%20of%20malware?s=malware&r=0&e=sph&as=s#w_how-do-i-get-rid-of-malware Malware].
If isn't malware or a plugin issue, you should take a look at the Knowledge Base article [[Search bar]]. Your default search might have been changed by a particular site. Sites like MSN, Yahoo, etc have been know to ask to become your homepage and change your search engine.
If the address bar search has been changed as well, you might want to take a look at [[Location bar search]].
If that doesn't work you should look at the article [[Preferences are not saved]].
Hopefully this helps! -
select CASE WHEN TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0 AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)||'00',SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),'DD-MM-YYYY HH24:MI:SS') end
from table;
i have written this query.whats wrong with this query..........
the error is "literal does not match format string"
Reegards soumenWhy does your date_format loose, ununify and not fix ?
And what is your exact requirement?
>>
CASE WHEN
TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'DDMMYYYY HH24:MM:SS'),13,2))>0
AND TO_NUMBER(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)) <14
<<
This is
CASE WHEN TO_CHAR(START_TIME_TIMESTAMP,'MM') between '01' and '13'
>>
THEN TO_DATE(CONCAT(SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MM:SS'),13,2)
||'00',
SUBSTR(TO_CHAR(START_TIME_TIMESTAMP,'YYYYMMDD HH24:MI:SS'),16)||'00'),
'DD-MM-YYYY HH24:MI:SS')
<<
This is
TO_DATE(
TO_CHAR(START_TIME_TIMESTAMP,'MM"00"SS"00"),
'DD-MM-YYYY HH24:MI:SS')
Obviously, format is not matching !
SQL> select to_char(sysdate,'MM"00"SS"00') from dual;
TO_CHAR(
06004900
SQL> select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual;
select to_date('06004900','DD-MM-YYYY HH24:MI:SS') from dual
ERROR at line 1:
ORA-01861: literal does not match format string
Maybe you are looking for
-
There is no item category assigned to account 56010/ABC1(Chart of Accounts)
Hi Gurus, I have activated the document splitting in the system and while posting a document the system showing the error No item Category could be determined for account 56010 in chart of accounts ABC1 and showing to assign item category what it mea
-
How to find the JAR files of a custom portal service?
Hi all, I have created and deployed a custom protal service on to the portal. Now for any of the other apps to make use of this service, i need the JAR files which correspond to this portal service. Where do I find them?? Regards, Narahari Message wa
-
How to set the value of application item using pl/sql in application process
Hi guys, I want a global variable (application item) whose value will be set at the start when a user logs in to the application. The value will be retrieved from database using a sql query. I do not know the exact syntax to set the value of applicat
-
Extracting material classification data for given sales order
Hi Experts, Requirement is I Need to display a report with material and its characteristics values for given sales order. Please let me know if there is any FM/standard tables involved to display the below fields. Sales order number, Sales order line
-
How to set the field non-editable in the classical report..
Hi.. How to set the field non-editable in the classical report..